-
Notifications
You must be signed in to change notification settings - Fork 122
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
docker_container keeps recreating container #934
Comments
It seems to be linked to the network configuration.
doesnt recreate but
does |
Thanks for the report! Did you pass |
No, i didn't know this option. I'm gonna try this and will post the result. |
|
If I set network_mode to anything except |
Hmm, If you are always using one of these sort, better always use |
Note to self for fixing this: the |
Hm. As you can see in the "os environment" all my remote machines are running on Linux. The only difference is only the used docker version. |
My guess is that the older Docker version returned After looking through the Docker commits, I found out that this was changed in moby/moby@4eed3dc, which first appeared in Docker 26.1.0 apparently. Basically this commit broke idempotency when using |
#936 should fix this. Can you try it out? |
@felixfontein Thank you very much! |
SUMMARY
I use ansible to deploy several docker containers on multiple servers. Ansible keep recreating containers even without changes.
ISSUE TYPE
COMPONENT NAME
docker_container
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
My Machine:
MacOS 14.5, Ansible via brew
Server with bug:
Debian bookworm, Docker version 27.0.3, build 7d4bcd8
Server without bug:
Debian boomworm, Docker version 25.0.3, build 4debf41
STEPS TO REPRODUCE
One of the definitions is:
As you can see, there is nothing unusual.
For whatever reason on some of my servers ansible keep recreating the container even if there are no changes.
What I've noticed so far:
EXPECTED RESULTS
Ansible shouldn't recreate the container.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: