mirror of
https://github.com/docker-library/haproxy.git
synced 2026-11-20 21:29:04 +03:00
Add "reload" support to Alpine by converting the docker-entrypoint.sh to POSIX
This commit is contained in:
1 parent
fa117ac983
commit
a11db1597f
9 files changed
+54
-9
No files matched your search
@@ -41,4 +41,6 @@ RUN set -x \
|
||||
&& apk add --virtual .haproxy-rundeps $runDeps \
|
||||
&& apk del .build-deps
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
|
||||
@@ -41,4 +41,6 @@ RUN set -x \
|
||||
&& apk add --virtual .haproxy-rundeps $runDeps \
|
||||
&& apk del .build-deps
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" = 'haproxy' ]; then
|
||||
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
|
||||
shift # "haproxy"
|
||||
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
|
||||
@@ -41,4 +41,6 @@ RUN set -x \
|
||||
&& apk add --virtual .haproxy-rundeps $runDeps \
|
||||
&& apk del .build-deps
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
if [ "$1" = 'haproxy' ]; then
|
||||
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
|
||||
shift # "haproxy"
|
||||
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- haproxy "$@"
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user