HI @adam2798
, welcome to the GitLab Community Forum! ![]()
The error message you’re seeing is Docker’s way of telling you that a container with the name “blah” already exists. When you try to run another job with the same container name, Docker throws this error because it can’t create a new container with the same name.
Do you see this error when running any/all jobs simultaneously, or only CI jobs that use services?
Assuming you encounter this when using services, here are some possible workarounds:
- Use unique names for each job: One way to avoid this issue is to ensure that each job uses a unique container name. This can be achieved by appending a unique identifier (like the CI_JOB_ID) to the container name. This way, each job will have its own unique container, and you won’t run into any conflicts.
services:
- name: blah:${CI_JOB_ID}`
-
Use Docker’s
--rmoption: Another way to avoid this issue is to use Docker’s--rmoption, which automatically removes the container when it exits. This ensures that the container name is freed up as soon as the job is done, making it available for the next job.
yamlCopy code
services:
- name: blah
command: ["--rm"]`
If you encounter this even when not using services - what value do you have configured for concurrent in your Runner’s config.toml? If it’s only set to 1, you’ll need to increase it to allow for running multiple jobs concurrently.