Browse Source

#36 Persist auth token to ~/.ngrok2/ngrok.yml instead of appending it to command line args

Andrii Abramov 6 years ago
parent
commit
aa0a09bc7f
3 changed files with 3 additions and 3 deletions
  1. 1 1
      Dockerfile
  2. 1 1
      Dockerfile.armhf
  3. 1 1
      entrypoint.sh

+ 1 - 1
Dockerfile

@@ -11,7 +11,7 @@ RUN set -x \
  && adduser -h /home/ngrok -D -u 6737 ngrok
  && adduser -h /home/ngrok -D -u 6737 ngrok
 
 
 # Add config script.
 # Add config script.
-COPY ngrok.yml /home/ngrok/.ngrok2/
+COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/
 COPY entrypoint.sh /
 COPY entrypoint.sh /
 
 
 USER ngrok
 USER ngrok

+ 1 - 1
Dockerfile.armhf

@@ -12,7 +12,7 @@ RUN set -x \
  && adduser -h /home/ngrok -D -u 6737 ngrok
  && adduser -h /home/ngrok -D -u 6737 ngrok
 
 
 # Add config script.
 # Add config script.
-COPY ngrok.yml /home/ngrok/.ngrok2/
+COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/
 COPY entrypoint.sh /
 COPY entrypoint.sh /
 
 
 RUN [ "cross-build-end" ]
 RUN [ "cross-build-end" ]

+ 1 - 1
entrypoint.sh

@@ -33,7 +33,7 @@ fi
 
 
 # Set the authorization token.
 # Set the authorization token.
 if [ -n "$NGROK_AUTH" ]; then
 if [ -n "$NGROK_AUTH" ]; then
-  ARGS="$ARGS -authtoken=$NGROK_AUTH "
+  echo "authtoken: $NGROK_AUTH" >> ~/.ngrok2/ngrok.yml
 fi
 fi
 
 
 # Set the subdomain or hostname, depending on which is set
 # Set the subdomain or hostname, depending on which is set