diff --git a/Dockerfile b/Dockerfile index 87c545b4c77f15376aeea7c5893575f42bf3c968..1a13d209d57212ab643ac8c1333307b55ad3e4da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ ENV ALLOW_RESTARTS=0 \ SECRETS=0 \ SERVICES=0 \ SESSION=0 \ + SOCKET_PATH=/var/run/docker.sock \ SWARM=0 \ SYSTEM=0 \ TASKS=0 \ diff --git a/README.md b/README.md index 2845fb05f932e59fe06f3d491756018367f66d51..44ca6aa2f9d2e4b1622b97dfa541dbb72ef9f588 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,13 @@ extremely critical but can expose some information that your service does not ne - `TASKS` - `VOLUMES` +## Use a different Docker socket location + +If your OS stores its Docker socket in a different location, you can specify this via +the `SOCKET_PATH` environment variable. + +For example, [balenaOS](https://www.balena.io/os/) exposes its socket at `/var/run/balena-engine.sock`. To accommodate this, merely set the `SOCKET_PATH` environment variable to `/var/run/balena-engine.sock`. + ## Development All the dependencies you need to develop this project (apart from Docker itself) are diff --git a/haproxy.cfg b/haproxy.cfg index 495ca7b484ab40a8a50753acce8771d22db13a99..011137ec41aa50dec0b9ffe404f43914f6dde234 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -37,7 +37,7 @@ defaults errorfile 504 /usr/local/etc/haproxy/errors/504.http backend dockerbackend - server dockersocket /var/run/docker.sock + server dockersocket $SOCKET_PATH frontend dockerfrontend bind :2375