Merge pull request #4 from luckydonald-forks/master

Made DOCKER_SOCK path user configurable
This commit is contained in:
will Farrell
2017-11-23 18:58:50 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ Note: You must apply `HEALTHCHECK` to your docker images first. See https://docs
```
AUTOHEAL_CONTAINER_LABEL=autoheal
AUTOHEAL_INTERVAL=5
DOCKER_SOCK=/var/run/docker.sock
```
## Testing
@@ -30,6 +31,6 @@ docker build -t autoheal .
docker run -d \
-e AUTOHEAL_CONTAINER_LABEL=all \
-v /var/run/docker.sock:/tmp/docker.sock \
-v /var/run/docker.sock:/var/run/docker.sock \
autoheal
```
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -e
DOCKER_SOCK=/tmp/docker.sock
DOCKER_SOCK=${DOCKER_SOCK:-/var/run/docker.sock}
TMP_DIR=/tmp/restart
if [ "$1" = 'autoheal' ] && [ -e ${DOCKER_SOCK} ]; then