|
|
|
|
|
by kpcyrd
3503 days ago
|
|
It's not that hard to work around this: I've deployed a global unit into our coreos cluster that regularly executes: #!/bin/sh
while :; do
# remove stopped containers w/ volumes
docker ps -a -q -f status=exited | \
xargs -r docker rm -v
# remove dangling images
docker images -f "dangling=true" -q | \
xargs -r docker rmi
sleep 6h
done
You need to be sure that you don't lose important data when running something like this in your setup, but it works nicely to remove old images. This script is deployed to non-coreos servers as well. |
|
I want to put my application, any application, in a nice tidy box, ship it to a server, any server, an be confident that it'll work. That's the promise of Docker. To me, Docker doesn't deliver on that promise if I have to copy&paste a 12 line bash script from HN to be able to do that or else face out-of-space problems at surely the worst possible moment. If I have to jump through hoops like that, then what's the gain?
Might as well just install an Ubuntu VM, apt-get everything I need by hand or with ansible and add my app to the startup script. I'll have similar complexity in a more mature and well-understood environment.