devilbox / docker-ngrok

MIT License
8 stars 8 forks source link

ngrok version 3 stops working on Jan 15th 2024 #16

Open plebward opened 6 months ago

plebward commented 6 months ago

Looks like this image used by the Devilbox is running ngrok version 3.0. I've had the following email from the ngrok team:

We’re dropping you this end-of-year note because we’ve seen you connect to ngrok in the past 90 days with a soon-to-be-deprecated agent. We need to inform you that all ngrok agents version 3.1 and older will stop working on January 15th, 2024 for all free users.

As per the ngrok Agent Version Support Policy, this serves as a notice that we will be officially ending support for all ngrok agent versions prior to 3.2 starting on January 15th, 2024. After January 15th, 2024, free accounts with agents running 3.1.1 and older will no longer connect to the ngrok service, and any endpoints they were serving will return errors and be unavailable.

luzel commented 4 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

hmontes commented 3 days 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

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.