From 57fa6945b15e2d143ba90994c9c099a4826d1c1d Mon Sep 17 00:00:00 2001 From: Ari Pringle Date: Fri, 10 Jun 2016 13:38:49 -0600 Subject: [PATCH] add support for DOCKER_API_VERSION --- Dockerfile | 3 ++- README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 62a3391..bbf46e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ ENV CLEAN_PERIOD=**None** \ KEEP_IMAGES=**None** \ KEEP_CONTAINERS=**None** \ LOOP=true \ - DEBUG=0 + DEBUG=0 \ + DOCKER_API_VERSION=1.20 # run.sh script uses some bash specific syntax RUN apk add --update bash docker grep diff --git a/README.md b/README.md index 5baa3cd..f31314f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The default parameters can be overridden by setting environment variables on the * **KEEP_CONTAINERS_NAMED** - List of names for exited or dead containers to avoid cleaning, e.g. "my-container1, persistent-data". * **LOOP** - Add the ability to do non-looped cleanups, run it once and exit. Options are true, false. Defaults to true to run it forever in loops. * **DEBUG** - Set to 1 to enable more debugging output on pattern matches + * **DOCKER_API_VERSION** - The docker API version to use. This defaults to 1.20, but you can override it here in case the docker version on your host differs from the one that is installed in this container. You can find this on your host system by running `docker version --format '{{.Client.APIVersion}}'`. Note that **KEEP_IMAGES**, **KEEP_CONTAINERS**, and **KEEP_CONTAINERS_NAMED** are left-anchored bash shell pattern matching lists (NOT regexps). Therefore, the image **foo/bar:tag** will be matched by ANY of the following: