Skip to content

devilbox/docker-ngrok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ngrok

lint build nightly

Tag Gitter Discourse License

Available Architectures: amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x, mips64le

Docker Hub Upstream Project

Available Docker tags

Docker Tag Description
latest Latest Alpine image (default)
alpine Latest Alpine image
bookworm Latest Debian Bookworm image
bullseye Latest Debian Bullseye image
buster Latest Debian Buster image
stretch Latest Debian Stretch image
[0-9]\.[0-9]+ Git tagged Alpine image. E.g: 0.53
alpine-[0-9]\.[0-9]+ Git tagged Alpine image. E.g: alpine-0.53
bookworm-[0-9]\.[0-9]+ Git tagged Debian Stretch image. E.g: bookworm-0.53
bullseye-[0-9]\.[0-9]+ Git tagged Debian Stretch image. E.g: bullseye-0.53
buster-[0-9]\.[0-9]+ Git tagged Debian Stretch image. E.g: buster-0.53
stretch-[0-9]\.[0-9]+ Git tagged Debian Stretch image. E.g: stretch-0.53
release-[0-9]\.[0-9]+ Git branch Alpine image. E.g: release-0.53
alpine-release-[0-9]\.[0-9]+ Git branch Alpine image. E.g: alpine-release-0.53
bookworm-release-[0-9]\.[0-9]+ Git branch Debian Stretch image. E.g: bookworm-release-0.53
bullseye-release-[0-9]\.[0-9]+ Git branch Debian Stretch image. E.g: bullseye-release-0.53
buster-release-[0-9]\.[0-9]+ Git branch Debian Stretch image. E.g: buster-release-0.53
stretch-release-[0-9]\.[0-9]+ Git branch Debian Stretch image. E.g: stretch-release-0.53

Documentation

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

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 to us)
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

  • <domain.tld> is the virtual hostname that you want to serve via Ngrok
  • <addr> is the hostname or IP address of the web server
  • <port> is the port on which the web server is reachable via HTTP
# 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