miquelbrazil / docker-ngrok

MIT License
1 stars 0 forks source link

Ngrok

Build Status Tag Gitter Discourse License

Docker Hub Upstream Project

Documentation

In case you seek help, go and visit the community pages.

Documentation

Chat

Forum

devilbox.readthedocs.io gitter.im/devilbox devilbox.discourse.group

Build

# Build the Docker image locally
make build

# Rebuild the Docker image locally without cache
make rebuild

# Test the Docker image after building
make test

Environment variables

Variable Default value Description
HTTP_TUNNELS `` HTTP tunnel definition in the form of:
<domain.tld>:<addr>:<port>
or
<domain1.tld>:<addr>:<port>,<domain2.tld>:<addr>:<port>

Note: If you don't use a license you can only specify a single tunnel. If your license is pro enough, you can have multiple comma separated tunnels
REGION ` | Choose the region where the ngrok client will connect to host its tunnels. (Defaults tous`) .
AUTHTOKEN `` Your Ngrok license authtoken. You don't need to have a license for a single tunnel and can ommit this variable. Nevertheless they also have a free license that might be worth checking out .

HTTP_TUNNELS

# Make vhost "project1.loc" which runs on localhost:8080 available
HTTP_TUNNELS=project1.loc:localhost:8080

# Make two vhosts available which run on host apache:80
HTTP_TUNNELS=project1.loc:apache:80,project2.loc:apache:80

# Make two vhosts from two different web server addresses available 
HTTP_TUNNELS=project1.loc:localhost:8080,project2.loc:apache:80

AUTHTOKEN

This token is provided to you after registering https://ngrok.com

Exposed ports

Container Port Description
4040 Ngrok management console. Use it to obtain created outside DNS names after startup

Example

Forward webserver running on host os on ip 192.168.0.2 on port 8080 to the internet via Ngrok.

docker run -d --rm --name devilbox-ngrok \
  -e HTTP_TUNNELS="project1.loc:192.168.0.2:8080" \
  -p "4040:4040" \
  devilbox/ngrok

Open up your browser at http://127.0.0.1:4040 to see your DNS names.

License

MIT License

Copyright (c) 2019 cytopia