mirror of
https://github.com/willfarrell/docker-autoheal.git
synced 2024-12-06 19:16:20 +01:00
Merge pull request #4 from luckydonald-forks/master
Made DOCKER_SOCK path user configurable
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user