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

Multiple run of dtcw with docker is failing because of a container name conflict #829

Closed
jmini opened this issue Mar 22, 2022 · 3 comments · Fixed by #1143
Closed

Multiple run of dtcw with docker is failing because of a container name conflict #829

jmini opened this issue Mar 22, 2022 · 3 comments · Fixed by #1143
Assignees
Milestone

Comments

@jmini
Copy link
Collaborator

jmini commented Mar 22, 2022

Describe the bug
Multiple run of docToolchain via docker is not supported on the same machine

To Reproduce
Have long run of docToolchain and start 2 of them in parallel.

Current behavior

Failing with:

./dtcw generateSite
dtcw - docToolchain wrapper V0.29
docToolchain V2.0.3
docker available
/usr/bin/docker
use docker installation
docker: Error response from daemon: Conflict. The container name "/doctoolchain" is already in use by container "3352c81b6369435e454b2343e3862cb5d14c151fad635322ec9b505909065270". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.

Expected behavior
Is it really required to name the container to a fix name, couldn't be something like "doctoolchain+" or something random.

Configuration

  • docToolchain 2.0.3
  • OS: Linux
@rdmueller
Copy link
Member

I wasn't aware of this. No, a fixed name is not required.

I guess we have to fix this line:

https://github.com/docToolchain/doctoolchain.github.io/blob/master/dtcw#L209

shall we add a timestamp? Or shall we remove the -name parameter?

@jmini
Copy link
Collaborator Author

jmini commented Mar 25, 2022

If -name is removed you get a random name like "marvelous-lion".

I tend to agree with the author of this question:
https://www.reddit.com/r/docker/comments/ga5f5t/can_you_specify_a_prefix_for_a_random_docker_name/

And I think that having a $(date +%s) suffix is great to see which tool has spawned a container…

@rdmueller
Copy link
Member

Sounds perfect. Would you mind to send a PR?

@mh182 mh182 self-assigned this Mar 9, 2023
@mh182 mh182 added this to the Java 17 milestone Apr 27, 2023
mh182 added a commit to mh182/docToolchain that referenced this issue May 1, 2023
…void conflicts

Add timestamp to the container name (YYYYmmdd_HHMMSS).
mh182 added a commit to mh182/docToolchain that referenced this issue May 2, 2023
…void conflicts

Add timestamp to the container name (YYYYmmdd_HHMMSS).
mh182 added a commit that referenced this issue May 2, 2023
Add timestamp to the container name (YYYYmmdd_HHMMSS).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment