use /var/lib instead of /var/run

Derp. /var/run is cleared on reboot, breaking docker-gc.
This commit is contained in:
Daniel Norberg committed 2014-09-23 17:00:24 +02:00
1 parent de5864793d
commit 33b5a9f466
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ repositories when starting new containers even though the images themselves are
still on disk.
This script is intended to be run as a cron job. It is stateful and stores its
between-run state in `/var/run/docker-gc` by default, overridable by setting
between-run state in `/var/lib/docker-gc` by default, overridable by setting
`$STATE_DIR`.
Vendored
+1 -1
View File
@@ -1 +1 @@
var/run/docker-gc
var/lib/docker-gc
+2 -2
View File
@@ -12,7 +12,7 @@
# forcing users to re-pull the repositories even though the images
# themselves are still on disk.
# Note: State is stored in $STATE_DIR, defaulting to /var/run/docker-gc
# Note: State is stored in $STATE_DIR, defaulting to /var/lib/docker-gc
set -o nounset
set -o errexit
@@ -40,7 +40,7 @@ while getopts ":f" opt; do
esac
done
STATE_DIR=${STATE_DIR:=/var/run/docker-gc}
STATE_DIR=${STATE_DIR:=/var/lib/docker-gc}
cd "$STATE_DIR"