Greg Dubicki
Greg Dubicki
This PR will help to keep only a single tag of a given image: https://github.com/garethr/garethr-docker/pull/696
Frankly speaking I think that I should rather make it configurable, opt-in behaviour as the way it currently works mirrors docker cli `docker rmi`, which when not given any tag...
We are also affected by this and I would like to fix it. But it's at least slightly more complicated than you suggest, @negast. Pre-releases have more possible segments than...
I think that this works, although it could use some optimisation (probably one `sed` in place of `tr` and those 2 `sed`s will do): `pip install pip==notreallyaversion 2>&1 | grep...
Note to self: we need to remember that the behavior of this should change if we add `—pre` to the params passed to pip.
Maybe this will help https://github.com/garethr/garethr-docker/pull/697 ?
There is (undocumented though) option to delete the container after running for `docker::run` here https://github.com/garethr/garethr-docker/blob/master/manifests/run.pp#L107 .
Oh, ok. Then there is another undocumented :), but standard, parameter - `ensure` - which you can use to delete the service. See the code: https://github.com/garethr/garethr-docker/blob/master/manifests/run.pp#L306
Example: ``` docker::run { 'helloworld': ensure => absent, image => 'base', command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"', } ```