mirror of
https://github.com/Tecnativa/docker-socket-proxy
synced 2025-07-04 14:22:36 +00:00

- moved most of docker-entrypoint.sh into start-haproxy.sh - made container run as root initially, assign group of docker socket to haproxy user and execute start-haproxy.sh as haproxy - passthrough positional parameters to start-haproxy - updated documentation
9 lines
255 B
Bash
Executable File
9 lines
255 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# add haproxy user to group of docker socket
|
|
DOCKER_GROUP=$(stat -c %G "$SOCKET_PATH")
|
|
adduser haproxy "$DOCKER_GROUP"
|
|
|
|
# continue as haproxy user, preserving entrypoint parameters
|
|
su -s /bin/sh -c 'start-haproxy.sh "$@"' haproxy -- "$@" |