1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-12-21 06:08:06 +00:00

Add environment variable to configure Docker socket location in image

This commit is contained in:
Aaron Bach 2021-11-23 10:54:54 -07:00 committed by João Marques
parent 08910fecaa
commit 8ed50a6526
3 changed files with 9 additions and 1 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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