Open plebward opened 6 months ago
It surprised me this morning. Tried to rebuild devilbox/ngrok and got error
/bin/sh: ARCH: parameter not set
For quick fix created own files.
./devilbox/data/ngrok/Dockerfile from here ./devilbox/data/ngrok/data/docker-entrypoint.sh from here ./devilbox/data/ngrok/data/ngrok.yml from here
In Docker file ignore ${ARCH} end replace with architecture string. Example for OSX Docker Desktop. "http(s)?://.+ngrok-(.)stable-${ARCH}.tgz" will be "http(s)?://.+ngrok-(.)stable-linux-arm64.tgz"
In docker-compose-override.yml
ngrok:
# image: devilbox/ngrok
build:
context: ./data/ngrok
dockerfile: Dockerfile
hostname: ngrok
environment:
- HTTP_TUNNELS=${NGROK_HTTP_TUNNELS:-httpd:httpd:80}
- AUTHTOKEN=${NGROK_AUTHTOKEN}
- REGION=${NGROK_REGION:-us}
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_NGROK:-4040}:4040"
networks:
app_net:
ipv4_address: 172.16.238.204
depends_on:
- bind
- php
- httpd
test new build with docker-compose up ngrok --build
It surprised me this morning. Tried to rebuild devilbox/ngrok and got error
/bin/sh: ARCH: parameter not set
For quick fix created own files.
./devilbox/data/ngrok/Dockerfile from here ./devilbox/data/ngrok/data/docker-entrypoint.sh from here ./devilbox/data/ngrok/data/ngrok.yml from here
In Docker file ignore ${ARCH} end replace with architecture string. Example for OSX Docker Desktop. "http(s)?://.+ngrok-(.)stable-${ARCH}.tgz" will be "http(s)?://.+ngrok-(.)stable-linux-arm64.tgz"
In docker-compose-override.yml
ngrok: # image: devilbox/ngrok build: context: ./data/ngrok dockerfile: Dockerfile hostname: ngrok environment: - HTTP_TUNNELS=${NGROK_HTTP_TUNNELS:-httpd:httpd:80} - AUTHTOKEN=${NGROK_AUTHTOKEN} - REGION=${NGROK_REGION:-us} ports: - "${LOCAL_LISTEN_ADDR}${HOST_PORT_NGROK:-4040}:4040" networks: app_net: ipv4_address: 172.16.238.204 depends_on: - bind - php - httpd
test new build with docker-compose up ngrok --build
That works. But you need to change ./devilbox/data/ngrok/data/docker-entrypoint.sh
Beetween "REQUIRED ENV VARIABLES" and "SPECIFY REGION" you need to add
# -------------------------------------------------------------------------------------------------
# REMOVE DUPLICATE ENTRIES
# -------------------------------------------------------------------------------------------------
sed -i '/^region:/d' "${CONFIG_FILE}"
sed -i '/^authtoken:/d' "${CONFIG_FILE}"
sed -i '/^tunnels:/,/^$/d' "${CONFIG_FILE}"
Because the default configuration of ngrok 3 had that parameters.
Looks like this image used by the Devilbox is running ngrok version 3.0. I've had the following email from the ngrok team: