hello,
The problem is when we run the plan manually in Bamboo, the build is successfully finalized, but when we run it scheduled, the build fails.
Error response from daemon: network with name m2mhubit_net already exists docker: Error response from daemon: Conflict. The container name "/m2mhubit_redis" is already in use by container "5e8b04b118871c955bc11fe3991b63c08d873b409fa60b5a57b4cadcd9f0373e". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'. docker: Error response from daemon: Conflict. The container name "/m2mhubit_m2mhub" is already in use by container "78b0a66e9aa8b2fe22af8faa3f9409b6736ef42f942f054df51c346497069080". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'. Error while starting containers for integration tests
We have checked the trigger configuration, but we still have the same problem.
Hello @ghalia sidi amemou ,
Welcome to Atlassian community.
The error message "response from daemon: network with name m2mhubit_net already exist" suggests that the build plan is trying to create a Docker network that already exists.
docker stop m2mhubit_redis || true && docker rm m2mhubit_redis || true
This script will first try to stop the container. If the container is not currently running (which would cause the `docker stop` command to fail), it will ignore the error and proceed to the next command (`docker rm`). This will remove the container if it exists. If the container does not exist (which would cause the `docker rm` command to fail), it again ignores the error.
You can add this script to the beginning of your build plan in Bamboo. This will ensure that any existing or running Docker container with the same name is removed before a new one is started, thereby avoiding the conflict error.
Let me know if this helps!
Regards,
Khushboo Gupta
*please don't forget to Accept the answer if your query was answered**
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.