From aa0a09bc7f05843dd5df0f3435f3c3a3ecd204ba Mon Sep 17 00:00:00 2001 From: Andrii Abramov Date: Sun, 24 Mar 2019 17:28:53 +0200 Subject: [PATCH] #36 Persist auth token to ~/.ngrok2/ngrok.yml instead of appending it to command line args --- Dockerfile | 2 +- Dockerfile.armhf | 2 +- entrypoint.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e9ed5a..8506f36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && adduser -h /home/ngrok -D -u 6737 ngrok # Add config script. -COPY ngrok.yml /home/ngrok/.ngrok2/ +COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/ COPY entrypoint.sh / USER ngrok diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 8ee7ec9..dd5a7e7 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -12,7 +12,7 @@ RUN set -x \ && adduser -h /home/ngrok -D -u 6737 ngrok # Add config script. -COPY ngrok.yml /home/ngrok/.ngrok2/ +COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/ COPY entrypoint.sh / RUN [ "cross-build-end" ] diff --git a/entrypoint.sh b/entrypoint.sh index 59a51f3..98a8a71 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,7 +33,7 @@ fi # Set the authorization token. if [ -n "$NGROK_AUTH" ]; then - ARGS="$ARGS -authtoken=$NGROK_AUTH " + echo "authtoken: $NGROK_AUTH" >> ~/.ngrok2/ngrok.yml fi # Set the subdomain or hostname, depending on which is set