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

conflict container name #108

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgheorghe
Copy link

if containers are not stopped and removed there is no way to start them again, because a name conflict will be created
i see the script has some stop code, but no remove
and stop code may no get executed in all the scenarios.

before starting a container make sure there is not a container with same name already running

docker: Error response from daemon: Conflict. The container name "/sc-trident2-saivs-run" is already in use by container "63d8f188ed76c35ca04e64ce6cf89b2e50bfb72a08b67820272c3d8900f90656". You have to remove (or rename) that container to be able to reuse that name.
Signed-off-by: Mircea Dan <mircea-dan.gheorghe@keysight.com>
add -f flag to rm command to make sure container gets removed even if it is not stopped

alternatively we could stop it before rm

Signed-off-by: Mircea Dan <mircea-dan.gheorghe@keysight.com>
@mgheorghe mgheorghe force-pushed the pr-conflict-container-name branch from f7ca740 to 492a7fb Compare May 5, 2023 16:56
@andriy-kokhan
Copy link
Contributor

@mgheorghe , please make sure all commits are signed off.

@andriy-kokhan
Copy link
Contributor

@mgheorghe , please make sure all commits are signed off.

please ignore this comment

@andriy-kokhan
Copy link
Contributor

These changes will cause an error message in case no container running:

$ ./run.sh 
Error: No such container: sc-trident2-saivs-run

@mgheorghe
Copy link
Author

lets set this as draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants