From 3606590b4866a36782321794785f4fb849007f40 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder Date: Wed, 30 Apr 2025 02:41:25 +0200 Subject: [PATCH] Revert "docker: fix docker entrypoint to allow the command option" This reverts commit 3c73c2de1c29990f50b427034c500823330322a2. Fixes #14 --- Dockerfile | 12 ++++++++++-- docker-entrypoint.sh | 24 ------------------------ 2 files changed, 10 insertions(+), 26 deletions(-) delete mode 100755 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 9a753d1..1f30ef6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,6 @@ FROM --platform=$TARGETPLATFORM ${from} COPY --from=build /go/bin/go-away /bin/go-away COPY examples/snippets/ /snippets/ -COPY docker-entrypoint.sh / ENV TZ UTC @@ -64,4 +63,13 @@ EXPOSE 6060/tcp ENV JWT_PRIVATE_KEY_SEED="${GOAWAY_JWT_PRIVATE_KEY_SEED}" -ENTRYPOINT ["/docker-entrypoint.sh"] +ENTRYPOINT /bin/go-away --bind "${GOAWAY_BIND}" --bind-network "${GOAWAY_BIND_NETWORK}" --socket-mode "${GOAWAY_SOCKET_MODE}" \ + --metrics-bind "${GOAWAY_METRICS_BIND}" --debug-bind "${GOAWAY_DEBUG_BIND}" \ + --config "${GOAWAY_CONFIG}" \ + --policy "${GOAWAY_POLICY}" --policy-snippets "/snippets" --policy-snippets "${GOAWAY_POLICY_SNIPPETS}" \ + --client-ip-header "${GOAWAY_CLIENT_IP_HEADER}" --backend-ip-header "${GOAWAY_BACKEND_IP_HEADER}" \ + --cache "${GOAWAY_CACHE}" \ + --challenge-template "${GOAWAY_CHALLENGE_TEMPLATE}" --challenge-template-theme "${GOAWAY_CHALLENGE_TEMPLATE_THEME}" \ + --slog-level "${GOAWAY_SLOG_LEVEL}" \ + --acme-autocert "${GOAWAY_ACME_AUTOCERT}" \ + --backend "${GOAWAY_BACKEND}" \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh deleted file mode 100755 index 7233079..0000000 --- a/docker-entrypoint.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -e - -if [ "${1#-}" != "$1" ]; then - set -- /bin/go-away \ - --bind "${GOAWAY_BIND}" --bind-network "${GOAWAY_BIND_NETWORK}" --socket-mode "${GOAWAY_SOCKET_MODE}" \ - --metrics-bind "${GOAWAY_METRICS_BIND}" --debug-bind "${GOAWAY_DEBUG_BIND}" \ - --config "${GOAWAY_CONFIG}" \ - --policy "${GOAWAY_POLICY}" --policy-snippets "/snippets" --policy-snippets "${GOAWAY_POLICY_SNIPPETS}" \ - --client-ip-header "${GOAWAY_CLIENT_IP_HEADER}" --backend-ip-header "${GOAWAY_BACKEND_IP_HEADER}" \ - --cache "${GOAWAY_CACHE}" \ - --challenge-template "${GOAWAY_CHALLENGE_TEMPLATE}" --challenge-template-theme "${GOAWAY_CHALLENGE_TEMPLATE_THEME}" \ - --slog-level "${GOAWAY_SLOG_LEVEL}" \ - --acme-autocert "${GOAWAY_ACME_AUTOCERT}" \ - --backend "${GOAWAY_BACKEND}" \ - "$@" -fi - -if [ "$1" = "go-away" ]; then - shift - set -- /bin/go-away "$@" -fi - -exec "$@"