mirror of
https://github.com/Tecnativa/docker-socket-proxy
synced 2025-07-04 22:32:36 +00:00
Merge c73447028f
into 87428842ed
This commit is contained in:
commit
48e494be6d
10
Dockerfile
10
Dockerfile
@ -1,4 +1,6 @@
|
|||||||
FROM haproxy:2.2-alpine
|
FROM haproxy:lts-alpine
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
EXPOSE 2375
|
EXPOSE 2375
|
||||||
ENV ALLOW_RESTARTS=0 \
|
ENV ALLOW_RESTARTS=0 \
|
||||||
@ -30,4 +32,10 @@ ENV ALLOW_RESTARTS=0 \
|
|||||||
TASKS=0 \
|
TASKS=0 \
|
||||||
VERSION=1 \
|
VERSION=1 \
|
||||||
VOLUMES=0
|
VOLUMES=0
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
||||||
|
|
||||||
|
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
|
||||||
|
10
docker-entrypoint.sh
Executable file
10
docker-entrypoint.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Create a group with the same gid as the docker socket
|
||||||
|
export DOCKER_GID=$(stat -c "%g" $SOCKET_PATH)
|
||||||
|
addgroup -g $DOCKER_GID docker
|
||||||
|
|
||||||
|
# Run the original entrypoint - Our work here is done.
|
||||||
|
exec /usr/local/bin/docker-entrypoint.sh $@
|
@ -4,6 +4,9 @@ global
|
|||||||
pidfile /run/haproxy.pid
|
pidfile /run/haproxy.pid
|
||||||
maxconn 4000
|
maxconn 4000
|
||||||
|
|
||||||
|
user haproxy
|
||||||
|
group docker
|
||||||
|
|
||||||
# Turn on stats unix socket
|
# Turn on stats unix socket
|
||||||
server-state-file /var/lib/haproxy/server-state
|
server-state-file /var/lib/haproxy/server-state
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user