You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to start-up an ngrok instance and query the /api/tunnels endpoint to fetch settings for downstream services.
When running docker-ngrok using a configuration file, the /api/tunnels endpoint as well as the webUI are not visible/usable on the exposed port on the host.
Example:
docker-compose.yaml proxying requests to services running in docker
In the folder where the above docker-compose.yaml and ngrok.yml are located, open a shell and execute docker compose up -d.
The container will start, no logs will be visible. Going to http://localhost:4056 will return a connection error, same when querying the /api/tunnels endpoint.
Using a slightly modified image (to add curl, see following Dockerfile) the result is the same, however attaching a terminal to the container and executing curl http://localhost:4040/api/tunnels returns the correct payload.
FROM ngrok/ngrok:debian
USER root
RUN apt-get -y update; apt-get -y install curl
USER ngrok
Using the following docker-compose.yaml that instead starts ngrok using a command-line argument works as expected (UI exposed to http://localhost:4056 and configuration available via API at /api/tunnels:
Starting the image with a configuration file using an interactive terminal ( such as with docker run -it -p 4056:4040 -v /$(pwd)/ngrok/ngrok.yml:/etc/ngrok.yml -e NGROK_CONFIG=/etc/ngrok.yml ngrok/ngrok) still returns a connection error, however the ngrok endpoints listed in the terminal seem to work correctly (in the example above they would throw a bad gateway error if no services are running with that name/port combination).
The text was updated successfully, but these errors were encountered:
Also see this issue. When using NGROK_CONFIG attempting to browse anything (i.e localhost:4040) will result in an error.
$ http localhost:4040
http: error: ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) while doing a GET request to URL: http://localhost:4040/
As soon as I switch to NGROK_AUTHTOKEN everything works as expected.
I am trying to start-up an
ngrok
instance and query the/api/tunnels
endpoint to fetch settings for downstream services.When running
docker-ngrok
using a configuration file, the/api/tunnels
endpoint as well as the webUI are not visible/usable on the exposed port on the host.Example:
docker-compose.yaml
proxying requests to services running in dockerngrok.yml
In the folder where the above
docker-compose.yaml
andngrok.yml
are located, open a shell and executedocker compose up -d
.The container will start, no logs will be visible. Going to
http://localhost:4056
will return a connection error, same when querying the/api/tunnels
endpoint.Using a slightly modified image (to add
curl
, see followingDockerfile
) the result is the same, however attaching a terminal to the container and executingcurl http://localhost:4040/api/tunnels
returns the correct payload.Using the following
docker-compose.yaml
that instead starts ngrok using a command-line argument works as expected (UI exposed tohttp://localhost:4056
and configuration available via API at/api/tunnels
:Starting the image with a configuration file using an interactive terminal ( such as with
docker run -it -p 4056:4040 -v /$(pwd)/ngrok/ngrok.yml:/etc/ngrok.yml -e NGROK_CONFIG=/etc/ngrok.yml ngrok/ngrok
) still returns a connection error, however thengrok
endpoints listed in the terminal seem to work correctly (in the example above they would throw a bad gateway error if no services are running with that name/port combination).The text was updated successfully, but these errors were encountered: