Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superadmin container creation in a loop with launch.ps1 (Windows) #375

Closed
helderbetiol opened this issue Feb 13, 2024 · 2 comments · Fixed by #376
Closed

Superadmin container creation in a loop with launch.ps1 (Windows) #375

helderbetiol opened this issue Feb 13, 2024 · 2 comments · Fixed by #376
Assignees
Labels
APP Bug Something isn't working

Comments

@helderbetiol
Copy link
Collaborator

helderbetiol commented Feb 13, 2024

Even when no superadmin container is created, executing the launch.ps1 script to create it will cause a loop saying the container already exists:

Container ogree-superadmin already exists
Container ogree-superadmin-1 already exists
Container ogree-superadmin-2 already exists
Container ogree-superadmin-3 already exists
Container ogree-superadmin-4 already exists
...
@helderbetiol helderbetiol self-assigned this Feb 13, 2024
@helderbetiol helderbetiol added Bug Something isn't working APP labels Feb 13, 2024
@helderbetiol
Copy link
Collaborator Author

helderbetiol commented Feb 13, 2024

The script executes a docker ps command to check with a container with the same name already exists before trying to create it, increment the name if it is the case. The command is not working, it returns failed to get console mode for stdout: The handle is invalid. This has been identified as an error from docker version 4.27.0+ when running with Powershell: docker/for-win#13891
According to the thread, a fix should be released soon with version 4.28.

@helderbetiol
Copy link
Collaborator Author

In the meantime, a modification to the script is proposed: if unable to check existing containers, try to create it once with the default name (ogree-superadmin). If it does not work because a container already exists with this name, the error will be displayed as follow and no new container will be launched:

Unable to check running containers! Try default name only
Launch ogree-superadmin container
docker: Error response from daemon: Conflict. The container name "/ogree-superadmin" is already in use by container "bf4d88f3b016a6c6450e7bc0c66d85431f82d6b97a13f3ca7691b18646202222". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
UNABLE TO LAUNCH WEBAPP CONTAINER, CHECK ERROR ABOVE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant