diff --git a/Dockerfile b/Dockerfile index e642c14..83ca918 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.19-alpine AS caddy ENV XDG_CONFIG_HOME /config ENV XDG_DATA_HOME /data -RUN set -e \ +RUN set -ex \ export XCADDY_SETCAP=1; \ export version=$(curl -q -LSsf "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name | grep '^' || exit 5); \ echo ">>>>>>>>>>>>>>> ${version} ###############" diff --git a/rootfs/usr/local/bin/start-caddy.sh b/rootfs/usr/local/bin/start-caddy.sh index 969ce66..e89a2b2 100755 --- a/rootfs/usr/local/bin/start-caddy.sh +++ b/rootfs/usr/local/bin/start-caddy.sh @@ -72,7 +72,7 @@ CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | a # Overwrite variables #SERVICE_PORT="" SERVICE_NAME="caddy" -SERVICE_COMMAND="$SERVICE_NAME -conf /etc/caddy/Caddyfile" +SERVICE_COMMAND="$SERVICE_NAME run --config /config/caddy/Caddyfile" export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Pre copy commands