Removes old images and containers from the host.
673
Removes old images and containers from the host.
The container accepts an INTERVAL environment variable with the number of
seconds to sleep before recurring.
# Start the container with access to the docker bin and docker.sock
docker run -d \
-v hvar/run/docker.sock:/var/run/docker.sock \
-v $(which docker):/usr/bin/docker \
andersjanmyr/docker-clean-host
The commands run are:
docker rmi $(docker images -q)
docker rm -v $(docker ps -qa --no-trunc)
Content type
Image
Digest
Size
18.1 MB
Last updated
over 10 years ago
docker pull andersjanmyr/docker-clean-host