Giter Club home page Giter Club logo

docker-ngrok's Introduction

Docker Hub

Supported tags and respective Dockerfile links

A Docker image for ngrok v2, introspected tunnels to localhost. It's based on the excellent work of wizardapps/ngrok and fnichol/ngrok.

Features

  • Small: Built using Alpine.
  • Simple: Just link as http or https in most cases, see below; exposes ngrok server 4040 port.
  • Secure: Runs as non-root user with a random UID 6737 (to avoid mapping to an existing UID).

Configuration

To see command-line options, run docker run --rm wernight/ngrok ngrok --help.

Usage

Supposing you've an Apache or Nginx Docker container named web_service_container listening on port 80:

$ docker run --rm -it --link web_service_container wernight/ngrok ngrok http web_service_container:80

Environment variables

Please consider using directly the command-line arguments of Ngrok.

If you use the default CMD (i.e. don't specify the ngrok command-line but only wernight/ngrok), then you can use instead envrionment variables magic below.

You simply have to link the Ngrok container to the application under the app or http or https aliases, and all of the configuration will be done for you by default.

Additionally, you can specify one of several environment variable (via -e) to configure your Ngrok tunnel:

  • NGROK_AUTHTOKEN - Authentication Token for your Ngrok account. This is needed for custom subdomains, custom domains, and HTTP authentication.
  • NGROK_SUBDOMAIN - Name of the custom subdomain to use for your tunnel. You must also provide the authentication token.
  • NGROK_HOSTNAME - Paying Ngrok customers can specify a custom domain. Only one subdomain or domain can be specified, with the domain taking priority.
  • NGROK_REMOTE_ADDR - Name of the reserved TCP address to use for a TCP tunnel. You must also provide the authentication token.
  • NGROK_USERNAME - Username to use for HTTP authentication on the tunnel. You must also specify an authentication token.
  • NGROK_PASSWORD - Password to use for HTTP authentication on the tunnel. You must also specify an authentication token.
  • NGROK_PROTOCOL - Can either be HTTP, TLS or TCP, and it defaults to HTTP if not specified. If set to TCP, Ngrok will allocate a port instead of a subdomain and proxy TCP requests directly to your application.
  • NGROK_PORT - Port to expose (defaults to 80 for HTTP protocol, 443 for TLS protocol). If the server is non-local, the hostname can also be specified, e.g. 192.168.0.102:80 or dev.local:443.
  • NGROK_REGION - Location of the ngrok tunnel server; can be us (United States, default), eu (Europe), ap (Asia/Pacific) or au (Australia)
  • NGROK_LOOK_DOMAIN - This is the domain name referred to by ngrok. (default: localhost).
  • NGROK_BINDTLS - Toggle tunneling only HTTP or HTTPS traffic. When true, Ngrok only opens the HTTPS endpoint. When false, Ngrok only opens the HTTP endpoint
  • NGROK_HEADER - Rewrites the Host header for incoming HTTP requests to determine which development site to display.
  • NGROK_DEBUG - Toggle output of logs. When true, Ngrok will output logs to stdout.

Full example

  1. We'll set up a simple example HTTP server in a docker container named www:

    $ docker run -v /usr/share/nginx/html --name www_data busybox true
    $ docker run --rm --volumes-from www_data busybox /bin/sh -c 'echo "<h1>Yo</h1>" > /usr/share/nginx/html/index.html'
    $ docker run -d -p 80 --volumes-from www_data --name www nginx
    $ curl $(docker port www 80)
    <h1>Yo</h1>
    
  2. Now we'll link that HTTP server into an ngrok container to expose it on the internet:

    $ docker run -d -p 4040 --link www:http --name www_ngrok wernight/ngrok
    
  3. You can now access the API to find the assigned domain:

    $ curl $(docker port www_ngrok 4040)/api/tunnels
    

    or access the web UI to see requests and responses:

    $ xdg-open http://$(docker port www_ngrok 4040)
    

Helper

For common cases you may want to create an alias in your ~/.profile (or ~/.bashrc, ~/.zshrc, or equivalent):

function docker-ngrok() {
  docker run --rm -it --link "$1":http wernight/ngrok ngrok http http:80
}
# For ZSH with Oh-My-Zsh! and 'docker' plugin enabled, you can also enable auto-completion:
#compdef __docker_containers docker-ngrok

Then to run the simple example just do docker-ngrok web_service_container.

For non dockerized http targets consider this helper function:

function expose-ngrok() {
  docker run --rm --net=host -e NGROK_PORT="$1" wernight/ngrok
}

and then visit localhost:4040 for receiving the links.

Feedbacks

Report issues/questions/feature requests on GitHub Issues.

Pull requests are very welcome!

docker-ngrok's People

Contributors

aaabramov avatar adrienkuhn avatar apoclyps avatar barakplasma avatar bkuhl avatar bobsammers avatar clofresh avatar codycodes avatar ibobo avatar idjohnson avatar j796160836 avatar matthewbaggett avatar mtib avatar sean-e-dietrich avatar sof3 avatar tuurlijk avatar wernight avatar zabio3 avatar zetachang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-ngrok's Issues

Issue when docker-compose

When using docker compose I have to set the HTTP_PORT as an environment variable and it will not map to the linked host.

 nginx-proxy:
    container_name: nginx-proxy
    image: nginx
    ports:
      - "0.0.0.0:80:80"
      - "0.0.0.0:443:443"
    volumes:
      - "./volumes/conf.d:/etc/nginx/conf.d"
      - "./volumes/vhost.d:/etc/nginx/vhost.d"
      - "./volumes/certs:/etc/nginx/certs:ro"
      - "/usr/share/nginx/html"
 ngrok:
    container_name: ngrok
    ports:
      - "0.0.0.0:4040:4040"
    image: wernight/ngrok
    links:
      - nginx-proxy
    environment:
      - NGROK_AUTH=<auth key>
      - NGROK_SUBDOMAIN=mysubdomain

Am I missing something? If I add the HTTP_PORT things get connected but ngrok complains it can't forward to localhost:80

user: Current not implemented on linux/amd64" $HOME=/home/ngrok

I'm following this tutorial to publish a local RocketMap to the web with ngrok: https://rocketmap.readthedocs.io/en/develop/advanced-install/docker.html#advanced-docker-setup

Here are the 2 commands regarding ngrok: https://rocketmap.readthedocs.io/en/develop/advanced-install/docker.html#external-access

The RocketMap is running correctly, but the ngrok container logs this to me:

t=2017-08-03T18:43:32+0000 lvl=warn msg="failed to get home directory, using $HOME instead" err="user: Current not implemented on linux/amd64" $HOME=/home/ngrok

docker info:

Containers: 3
 Running: 3
 Paused: 0
 Stopped: 0
Images: 5
Server Version: 17.06.0-ce
Storage Driver: devicemapper
 Pool Name: docker-202:1-2711675-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: ext4
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.772GB
 Data Space Total: 107.4GB
 Data Space Available: 47.14GB
 Metadata Space Used: 2.834MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.145GB
 Thin Pool Minimum Free Space: 10.74GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.77 (2012-10-15)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 987.9MiB
Name: mo-mueller
ID: Q67L:CMIH:UOEU:V6J7:5UES:G7WI:6FQZ:SQZT:TSOD:5RI2:XIJQ:WDSY
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

How can I fix that?

502 Bad Gateway

Hi,
I'm beginner with docker things so I would like to ask for help with the issue that I have with this image/container. When I set parameters NGROK_PORT to 5005 and NGROK_PROTOCOL to http and start it everything looks good but I'm not able to connect to the https nor to http forward links. Each try finish with 502 Bad Gateway.

502BadGateway

When I'm running ngrok from SSH terminal of synology with the same parameters it is running fine and I'm able to reach out https also http forward links without any issues. The only difference is that ngrok version (2.3.27) I'm running from cmd line.
Thanks in Advance

non dockerized http targets not working for Mac

I'm trying to use the the ngrok container to expose non-dockerized http target but does not working on Mac.
docker run --rm --net=host -e NGROK_PORT="$1" wernight/ngrok
does not start the container as expected on Mac
docker run --rm -p 4040:4040 -e NGROK_PORT="$1" wernight/ngrok
starts the container but the proposed ngrok tunneling url does not work

Failed to complete tunnel connection
The connection to https://f8fab24b.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:4200.

Make sure that a web service is running on localhost:4200 and that it is a valid address.

The error encountered was: dial tcp 127.0.0.1:4200: getsockopt: connection refused

Not problem instead to expose dockerize app using this container

Appending auth token to updated ngrok.yml potentially breaks ngrok configuration

Describe the bug:

When passing the NGROK_AUTH environment variable to entrypoint.sh, if the user's modified their ngrok.yml, it's likely that ngrok will exhibit unexpected behavior. This is caused by a rogue newline character lurking in the ngrok.yml file contained in this repository, and the command used to append the authtokento ngrok.yml.

I ran into this issue after tailoring this container to my needs and finding that NGROK_AUTH wasn't working.

Steps to reproduce:

  1. Replace ngrok.yml with the following (note it doesn't have a newline character):
web_addr: 0.0.0.0:4040
  1. Add an NGROK_AUTH environment variable and run your ngrok container. If you cat the file as follows:
    cat $HOME/.ngrok2/ngrok.yml

You'll see something like this:

web_addr: 0.0.0.0:4040authtoken: tokentokentokentoken

Expected behavior:

Appending the authtoken to ngrok.yml should work irrespective of the line before it, whether that line contains a newline character or not.

Fix:

I've created a pull request here that fixes this issue. There are only a couple of changes which you can view in the pull request.

I've tested this fix on ngrok.yml as follows:

✔️No characters present in file - still properly loads authtoken
✔️A line exists with a newline character at the end it (current state of ngrok.yml), as in the image below - works
multiple lines
✔️A line exists with no newline character at the end of it - works and fixes behavior where it wasn't previously working

I think these are all the cases where this issue would crop up, but please comment if there are others. I look forward to getting this merged in after it's verified. Thanks for the container! ✌️

Why not NGROK_PORT?

# Set the point.
if [ -n "$HTTPS_PORT" ]; then
  ARGS="$ARGS `echo $HTTPS_PORT | sed 's|^tcp://||'`"
elif [ -n "$HTTP_PORT" ]; then
  ARGS="$ARGS `echo $HTTP_PORT | sed 's|^tcp://||'`"
elif [ -n "$APP_PORT" ]; then
  ARGS="$ARGS `echo $APP_PORT | sed 's|^tcp://||'`"
fi

They all do the same thing. Why not NGROK_PORT? Every other variable uses NGROK_?

Clearly it would need to be an addition, but it would standardize things.

Update?

The ngrok client tool has been updated. (Now it is 2.3.38)

Recommend add a mail notification feature

Can add a mail notification feature to send a mail to notification the new port on docker container started?

Because every time you start the port it will change

NGROK_AUTH not working

I am trying to run a ngrok container using tcp protocol to connet to a docker db running in another container.
I noticed that after running the container the status was exited and running "docker logs containerId" gave me the alert that I needed the auth key.
So I run again with NGROK_AUTH env var but the result is the same, looks like he is not using the variable.

$ docker ps
CONTAINER ID   IMAGE                                       COMMAND                  CREATED      STATUS                       PORTS                                                 NAMES
66380598a02f   nginx                                       "/docker-entrypoint.…"   2 days ago   Up About an hour             0.0.0.0:49153->80/tcp, :::49153->80/tcp               www
89307e3e25e9   store/oracle/database-enterprise:12.2.0.1   "/bin/sh -c '/bin/ba…"   2 days ago   Up About an hour (healthy)   0.0.0.0:1521->1521/tcp, :::1521->1521/tcp, 5500/tcp   oracle12c

$ docker run -d -p 4040:4040 --net pkngroknet --name ngrok -e NGROK_PROTOCOL="TCP" -e NGROK_AUTH="<myKey>" wernight/ngrok ngrok tcp oracle12c:1521
b0736fdde39e8fced75ea525cd7bb634f083039d4383cb782da9c2ce4557c70f

$ docker logs b0736fdde39e
TCP tunnels are only available after you sign up.
Sign up at: https://dashboard.ngrok.com/signup

If you have already signed up, make sure your authtoken is installed.
Your authtoken is available on your dashboard: https://dashboard.ngrok.com/get-started/your-authtoken

ERR_NGROK_302

Am I doing something wrong?

multiple ports

How can i add multiple ports

I have nodejs and django application

  webapp:
    image: "python-node-buster:nikolaik-python3.7-nodejs15"
    ports:
      - "8001:8000"
    command:
      - python manage.py runserver --noreload 0.0.0.0:8000
    stdin_open: true   # Add this line into your service
    tty: true   # Add this line into your service
    networks:
      - django_network


  node:
    image: "python-node-buster:nikolaik-python3.7-nodejs15"
    ports:
      - "3000:3000"
    stdin_open: true  #https://stackoverflow.com/a/60902143/2897115
    networks:
      - node_network


  ngrok:
    image: wernight/ngrok:latest
    ports:
      - 4040:4040
    environment:
      NGROK_PROTOCOL: http
      NGROK_PORT: node:3000  <--- HOW TO ADD FOR MULTIPLE PORTS HERE
      NGROK_AUTH: ""
    depends_on:
      - node
      - webapp
    networks:
      - node_network
      - django_network

networks:
  django_network:
    driver: bridge
  node_network:
    driver: bridge

I want to access 8001 also how can i do that

TCP Examples

I've tried,

docker run -d -p 4040:4040 -e NGROK_REGION=ap -e NGROK_PROTOCOL=TCP --name ngrok wernight/ngrok ngrok tcp 7777

Also tried without NGROK_PROTOCOL=TCP but doesn't work either. When I try to curl for the public url, it says something about malformed URL and doesn't say anything else. It generates the URL though if I use ... ngrok http www:7777 but it's not the protocol I'm looking for.

Auth token file

As per discussion from #27 we can avoid printing auth token to be displayed in console as well as in ps aux output by saving it to ~/.ngrok2/ngrok.yml file with the following format:

authtoken: tokentokentokentokentoken

Periodically rebuild image

The current version inside of the image is outdated. It is version 2.3.25 while the current version is 2.3.34. Can a periodic build be set up to rebuild the image once a month or so? This could likely be achieved with a Github action which could send a webhook to rebuild.

Request: image version tag

Hi! IMHO it would be great versioning the docker image with tags. As I can see on docker hub only are available the tag latest (amd64) and armhf.

I mean maybe someday, when some changes will be released: a lot of users will need to fix incompatibilities in their settups.

Examples:

  • n.n.n-amd64
  • n.n.n-armhf
  • y.y.y (default amd64)

I found this image the las week and now is my high used image. Thanks!

authtoken is not respecting in container

hello.
i try to make a container using the following command but authtoken is not respecting

docker run -d -p 4040:4040 -–net common_nw -–name ngrok -e 'authtoken'='KEY' wernight/ngrok:armhf ngrok http ngrockclient:PORT

I replace the KEY and PORT keyword instead of original key because of security.

I also test the following command.

docker run -d -p 4040:4040 -–net common_nw -–name ngrok wernight/ngrok:armhf ngrok -authtoken='KEY' http ngrockclient:PORT

the container was created successfully but it ngrok global link expire after 1 day means it's clear that auth token is not respecting in the container.

ERROR: unknown shorthand flag: 'o' in -ostname=my-app.ngrok.io

Unknown error in regards to the deployment of a NGROK docker image in a TrueNAS setup. NGROK had been working for at least a year before this. Less than 48 hours ago something changed (might of been an update to the image). Unfortunately I am not a programmer, but I am good at following instructions. So any assistance that can be provided to me would be most appreciated. I am using a NGROK paid account.
Screenshot 2024-03-17 211103

Also, what does "failed to created fsnotify watcher: too many open files" mean?

Cannot link to webcontainer

Can someone help me please why I cannot link to my nginx container ?

 web:
    image: nginx:stable
    container_name: webcontainer
    ports:
      - "80:80"
    volumes:
      - ./:/var/www/myapp
      - ./myapp.conf:/etc/nginx/conf.d/myapp.conf
    expose:
      - 9000
    external_links:
      - php
      - db
      - ngrok
  ngrok:
    image: wernight/ngrok
    ports:
      - "4040:4040"

image

when I run this command

docker run --rm -it --link webcontainer wernight/ngrok ngrok http webcontainer:80

I will get an error

docker: Error response from daemon: Cannot link to /webcontainer, as it does not belong to the default network.

please help I'm confuse

Thank you in advance

Does not appear to respect Environment Variables

Image does not seem to respect the NGROK_AUTH nor the NGROK_SUBDOMAIN environment variables.

$ docker -v
Docker version 1.12.0-rc2, build 906eacd, experimental

$ docker images | grep ngrok
wernight/ngrok      latest              82fbe5dda839        6 days ago          23.73 MB

$ cat environment.list
NGROK_AUTH=AuthTokenAsAppearsInDashBoard
NGROK_SUBDOMAIN=custom-subdomain
NGROK_PROTOCOL=HTTP

$ docker run -it --env-file ./environment.list --rm wernight/ngrok env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=moby
TERM=xterm
NGROK_AUTH=AuthTokenAsAppearsInDashBoard
NGROK_SUBDOMAIN=custom-subdomain
NGROK_PROTOCOL=HTTP
no_proxy=*.local, 169.254/16
HOME=/home/ngrok

$ docker run -it --env-file ./environment.list -p 4040:4040 --net=host --rm wernight/ngrok ngrok http 1234

...initiates without a custom domain.

$ docker run -it --env-file ./environment.list -p 4040:4040 --net=host --rm wernight/ngrok ngrok http --subdomain=custom-domain 3000

Tunnel session failed: Only paid plans may bind custom subdomains.
Failed to bind the custom subdomain 'heroes-messageboard' for an unauthenticated client.
Sign up at: https://ngrok.com/signup

If you have already signed up, make sure your authtoken is installed.
Your authtoken is available on your dashboard: https://dashboard.ngrok.com

ERR_NGROK_305

Inspect Option Support?

Should have support for:
inspect:

Inspect defaults to true which is great for dev environments, but not so good if it's a production one.

HTTP auth failed

When HTTP auth is specified (i.e. -auth="admin:admin"), it looks like the credentials aren't being accepted for some reason.

Dashboard access via port 4040

I'm trying to have access to the ngrok dashboard, so I can replay received requests. Tried to connect by exposing port 4040, without success. Any hint? Will dig myself when I have more time otherwise and update if I find a solution.

Unable to assign external ngrok.io URL to localhost

I have ngrok docker container inside of my docker-compose. It was running fine, it was mapping container running inside of the docker network with the name events and port 8070 to external ngrok.io public URL. But then it suddenly stopped and this is what I see in the output.

ngrok_1              | npm info it worked if it ends with ok
ngrok_1              | npm info using [email protected]
ngrok_1              | npm info using [email protected]
ngrok_1              | npm info lifecycle [email protected]~prestart: [email protected]
ngrok_1              | npm info lifecycle [email protected]~start: [email protected]
ngrok_1              |
ngrok_1              | > [email protected] start /
ngrok_1              | > node index.js
ngrok_1              |
ngrok_1              |
ngrok_1              | The ngrok HTTP tunnel is active:
ngrok_1              |
ngrok_1              | undefined ---> events:8070

Undefined ---> events:8070
This ^ doesn't look good, does it? What does it normally means? ngrok service is down? Any help will be greatly appreciated.

Auth token?

Thanks a lot looks great !!!
How can I add an auth token ?
I tried docker run ngrok-container ngrok authtoken 'authToken' but it writes me:

t=2016-07-07T14:52:06+0000 lvl=warn msg="failed to get home directory, using $HOME instead" err="user: Current not implemented on linux/amd64" $HOME=/home/ngrok
Failed to save authtoken to configuration file '/home/ngrok/.ngrok2/ngrok.yml': open /home/ngrok/.ngrok2/ngrok.yml: permission denied

Nginx is showing always after generating ngrok url

Hi need some help please, after I added the image of wernight/ngrok, I rebuild my docker, when it goes up

I run this

docker run --rm -it --network myapp_default --link webcontainer wernight/ngrok ngrok http webcontainer:80

but when it generates the link of ngrok

when I click on it will display nginx index page it says successfully installed nginx.

normally when I run my app, I use myapp.local because I used windows hostfile

please help

Thank you in advance


version: "3.8"
services:

  web:
    image: nginx:stable
    container_name: webcontainer
    ports:
      - "80:80"
    volumes:
      - ./:/var/www/myapp
    expose:
      - 9000
    external_links:
      - php
      - db
  ngrok:
    image: wernight/ngrok
    links:
      - web
    ports:
      - "4040:4040"
    env_file: .env
    environment:
      NGROK_PORT: web:80

Does not support spaces in password

Try with the env var NGROK_PASSWORD="foo bar"

Result:

 + exec ngrok http '-region=ap' '-auth=user:foo\' bar 8000
ERROR:  You must specify a single argument: a port or address to tunnel to.
ERROR:  You specified 2 arguments: [bar 8000]

The problem is in this line:

ARGS="$ARGS -auth=$NGROK_USERNAME:$NGROK_PASSWORD "

$NGROK_PASSWORD should be quoted and escaped.

Specifying hostname to forward request

I was experiencing an issue where ngrok could not access localhost:80. It looked like ngrok was trying to take an external request into the docker container and fowarding it to localhost:80 which it couldn't find.

screen shot 2016-10-11 at 12 53 29 pm

Here's an example of my not functional config:

version: '2'

services:
  web:
    image: nginx:latest
    ports:
      - "80:80"
  ngrok:
    image: wernight/ngrok
    links:
      - web:http
    ports:
      - "4040:4040"
    env_file: .env

The solution was to tell it to forward incoming requests to web:80 and not alias the web container. Port 80 was the internal port that my web container was listening for, not the one that is publicly exposed. I was able to achieve this with the following configuration:

  ngrok:
    image: wernight/ngrok
    links:
      - web
    ports:
      - "4040:4040"
    env_file: .env
    environment:
      NGROK_PORT: web:80

In this case I happened to resolve the issue but wanted to post it here in case it was helpful to someone else.

transfer maintainership to ngrok?

Hi @wernight you've built a great ngrok docker image here, and we'd love to use it for the official docker image ngrok releases and maintains. Would you be willing to transfer ownership of that repository to my github account so I can add it to the official @ngrok organization? If we do that, links across the internet will continue working, folks will be able to find the latest source, and we'll be better able to preserve your git history. Would you be amenable to this?

Failed to complete tunnel connection

Hi,

i am a dockerized apache web server running with docker-compose. In order to get tunneling i type docker run --rm -it -p 4040:4040 --link dockerizedapp_apache:http --network dockerizedapp_default wernight/ngrok. Then i connect from my browser to localhost:4040 but trying to navigate to the ngrok link i get following problem:

Failed to complete tunnel connection

The connection to http://blablabla.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.

Make sure that a web service is running on localhost:80 and that it is a valid address.

The error encountered was: dial tcp [::1]:80: getsockopt: connection refused

Am i doing something wrong?

Thank you for your work.

api/tunnels returns empty response when using auth

Seems like there's an issue with the api responses when using an auth token.
I've tested the setup once with and once without an config file, and if the auth is in the config file, the api response returns empty.
The issue doesnt exist when using the non-docker version of ngrok.
Steps to reproduce:

  1. docker run --rm -it -p 4040:4040 -v ${HOME}/.ngrok2/ngrok.yml:/ngrok_auth.yml:ro --name www_ngrok wernight/ngrok ngrok http -config=/ngrok_auth.yml 3000
  2. curl $(docker port www_ngrok 4040)/api/tunnels
    Expected:
    To have a response with the tunnel listed
    Actual result:
    curl: (52) Empty reply from server

Receive ngrok url

Is there a way to get the assigned ngrok url (foobar.ngrok.io)?
Maybe with an API call against the ngrok container?
I need the value as an envionment value in another container. Currently I have to configure it manually.

Docker Issue with Ngrok

Docker Issue - #2458

Like i said :

Following this wiki : https://github.com/AHAAAAAAA/PokemonGo-Map/wiki/Docker

This is why i've got.
Administrateur@Calice-PC MINGW64 /f/Desktop/PokemonGo-Map/docker-ngrok (master) $ docker run --rm --link ngrok appropriate/curl sh -c "curl -s http://ngrok:4040/api/tunnels | grep -o 'https:\/\/[a-zA-Z0-9\.]\+'" E:\Logiciels\Docker Toolbox\docker.exe: Error response from daemon: Could not get container for ngrok. See 'E:\Logiciels\Docker Toolbox\docker.exe run --help'.

Some advices please ?

Computer : Windows 7 x64

Is it possible for this to listen to a port of a local VM?

Currently I ngrok the local IP of a vagrant box, and the application port. Everything is fine.

I want to put ngrok in a container for security and I saw this. Is the --link flag required? I tried to run without it and use the command I always use (ngrok http 172.17..x.x:some-port) and it starts but the request doesn't go from local ngrok container to vagrant address. Not sure if this is already a use case and I am not understanding correctly, or if it would require more troubleshooting on my end.

How to always running this container...

Hello,

First, thank you for this great job !!
I run your container, ngrok launch and website is available, ok...
But the process don't give me the hand and if i quit (CTRL+C), ngrok stop... How to launch your container and this don't stop...?

Thank you !

Updating NGROK docker and other questions

I've just come across this project and it has the potential to solve a problem I have with exposing my web services (running on a Synology NAS) while using a CGNAT Internet connection (4G) but I have a number of questions/issues.

I've noticed the version of ngrok in the docker image is out of date and the cli gives me an option to updateupdate available (version 2.3.35, Ctrl-U to update) .Performing an update however fails due to permissions errors. My first question can an update be performed via changing permissions someway or is there plans to make an updated version of docker-ngrok available?

Secondly is there a way to run multiple tunnels using one instance of the docker-ngrok container? As mentioned above I'd like to expose a number of local services and while I can easily expose one service my changing the environmental settings having the ability to expose multiple would be very handy.

Also I've attempted to expose the path/volume to the ngrok.yml (as per #22 (comment)) so that I can edit direct but my docker container restarts each time and the log states: /entrypoint.sh: line 36: can't create /home/ngrok/.ngrok2/ngrok.yml: Permission denied

Below is my config:

Screenshot 2020-05-19 at 12 25 41

Help with any of the above would be most grateful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.