* bump docker version and fix binary mv
* add volume cleanup
* mention volumes in readme
* keep docker-gc backward-compatibility
* improve remove volumes logic
* this would probably be a feature
* change back to original docker version
* exclude volumes removal
* add VOLUME_DELETE_ONLY_DRIVER
* fix typos (#6)
* exclude volumes file defaults to null (#7)
* it should be local, not locale (#8)
* Add dangling images to list of all images. (#9)
Otherwise, the container will fail to run with the error
Get http:///var/run/docker.sock/v1.18/version: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
This allows MINIMUM_IMAGES_TO_SAVE=1 to be set to save the most recent
image for a repository. Any number of images can be saved, e.g. you can
save the most recent 10 images with MINIMUM_IMAGES_TO_SAVE=10.
By default MINIMUM_IMAGES_TO_SAVE is set to 0, which keeps the behavior
of docker-gc the same as before this commit.
I followed the previous documentation and created a `/etc/cron.hourly/docker-gc.sh` which was not actually run because it has the `.sh` extension. To make sure other users don't make the same mistake I explicitly mentioned `/etc/cron.hourly/docker-gc` and added a command to validate that the job will run.
It looks like an alpine kind of thing, I tested the code on a few different places (Mac, Debian) where it worked as you'd expect. However, when using Alpine Linux, `[^ ]\+` did not return any IDs and cleaned up images I didn't want it to clean up.
This adds another environment variable flag to allow passing in -f to
the docker rm command when removing the container. If you're running
into issues with getting errors on removing containers, this ensures
they still get cleaned up.
When building on Ubuntu Trusty box I also needed to install build-essential, otherwise I got the error:
dpkg-checkbuilddeps: Unmet build dependencies: build-essential:native
There was no example of the match pattern used other than "patterns (in the `grep sense)", which tripped me up as I was using unescaped `+` in my patterns which didn't match anything. An example here should help avoid others' confusion 😄
db_auto_build is invoking `make` since we have a `Makefile` in the
project root.
Since we don't need this to be invoked when building the Debian package
at all, just move the Makefile to a different name (and update docs) to
avoid having to reconfigure the debuild build.
Following the same logic as was for excluding images
added an optional file to have containers excluded
by their names (file location defaults to
/etc/docker-gc-exclude-containers).
Updated README to include a section describing the
container exclude part.
* Added `debhelper` to required packages (I wasn't able to build the tool on Ubuntu 14.04 without this package)
* Updated version to 0.0.3 (since this is the latest version)