Comments (7)
I think I've figured out why I'm having issues.
Error response from daemon: Conflict, cannot force delete 0f51007ffb60 because the running container c513b6422ad9 is using it (docker untagged the image), stop it and retry
2014/09/16 07:33:43 Error: failed to remove one or more images
Looks like docker is removing the image name, but leaving the container processes behind. When I try to use the same tag name, it still exists.
from garethr-docker.
I think this is what I'm looking for. Want to make sure I'm following your logic. First, delete the existing image, get the latest, then restart the container with the new latest - for each time the manifest is executed. This correct? If there isn't a new image, then the running container should get left alone? It'd be nice if you could just specify the tag name in the docker::run call right? So that the module would only update if the tag was different than the current running container.
from garethr-docker.
Similar.
Pull latest image.
If running image isn't latest, stop, remove, restart.
Every time the manifest is called.
from garethr-docker.
Would be a great improvement for me to have this. When using use_name => false
the container is restarted as soon as I get a new image. With use_name => true
the upstart script detects I already have a container named $name
and just starts it. One solution might be to compare whether the current image hash equals the stored hash of the known container. If they match: Fine, start the known container. If they don't match: Throw it away and start a new one with the new image and the same nameβ¦
from garethr-docker.
I hacked mine to just docker rm all the time, so refresh events restart the container regardless:
Yelp/garethr-docker@garethr:master...master#diff-e8ee1e07315f2846862e4461968f10d0R88
from garethr-docker.
Not a complete puppet-based solution, but my PR at #209 provides a way to stop and restart the container with the newest image via the init script on the machine.
You'd simply run /etc/init.d/docker-YOURNAME cleanRestart
That will stop the container, remove the file in /var/run/docker-YOURNAME.cid, then restart the container with a fresh 'docker pull'. Note that you could 'docker pull' before running the init command to speed that up so that the current image is already on the machine.
from garethr-docker.
After much back and forth and great work by @solarkennedy this should now be resolved. Thanks all https://github.com/garethr/garethr-docker/pull/222/files
from garethr-docker.
Related Issues (20)
- docker::run ensure=> 'absent' inconsistent HOT 1
- env attribute does not work when a "-" is present HOT 4
- Using registry mirror
- CentOS/7 : Having "INSECURE_REGISTRY" option HOT 1
- Use docker::swarm as an exported resource HOT 5
- Error while evaluating a Resource Statement, Apt::Source[docker] HOT 3
- docker image, docker_tar and restart containers only on update? HOT 4
- Allow Docker to configure direct-lvm mode
- Docker 17.06 cannot get HOT 7
- Connecting to Docker Hub HOT 1
- RHEL 7 extra repository error
- Support docker-ce
- Please mark this module as deprecated and redirect to puppetlabs/puppetlabs-docker HOT 1
- Amazon Linux 2 support HOT 2
- Ubuntu: Install docker-ce instead of docker-engine? HOT 1
- Notice of Newer PuppetLabs Module HOT 1
- Docker registry auth doesn't check if it authed already? HOT 1
- $docker::service_provider is not respected by docker::run HOT 1
- support for Centos 8 HOT 1
- Please point users of this module to https://github.com/puppetlabs/puppetlabs-docker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garethr-docker.