Sign inSign up

oanhnn/ngrok

By oanhnn

•Updated over 6 years ago

Image
0

339

oanhnn/ngrok repository overview

⁠oanhnn/docker-ngrok

Build Status Docker Pulls Software License

A Docker⁠ image for ngrok⁠ v2, introspected tunnels to localhost. The idea was originally inspired by the wernight/ngrok⁠ image.

⁠Features

  • Small: Built using busybox⁠.
  • 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).

⁠Usage

Supposing you've an Apache or Nginx Docker container named web listening on port 8080:

$ docker run --rm -it --link web oanhnn/ngrok ngrok http web:8080

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

⁠Environment variable

Environment variableNote
NGROK_AUTHAuthentication key for your Ngrok account. This is needed for custom subdomains, custom domains, and HTTP authentication
NGROK_HOSTNAMEPaying Ngrok customers can specify a custom domain. Only one subdomain or domain can be specified, with the domain taking priority
NGROK_SUBDOMAINName of the custom subdomain to use for your tunnel. You must also provide the authentication token
NGROK_REMOTE_ADDRName of the reserved TCP address to use for a TCP tunnel. You must also provide the authentication token
NGROK_USERNAMEUsername to use for HTTP Basic authentication on the tunnel. You must also specify an authentication token
NGROK_PASSWORDPassword to use for HTTP Basic authentication on the tunnel. You must also specify an authentication token
NGROK_PROTOCOLCan either be HTTP 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_PORTPort to expose (defaults to 80 for HTTP protocol). If the server is non-local, the hostname can also be specified, e.g. 192.168.0.102:80
NGROK_REGIONLocation of the ngrok tunnel server; can be us (United States, default), eu (Europe), ap (Asia/Pacific) or au (Australia)
NGROK_HEADER
NGROK_DEBUGIf specified, container will show output to stdout
NGROK_LOOK_DOMAINThis is the domain name referred to by ngrok. (default: localhost)
NGROK_BINDTLSToggle tunneling only HTTP or HTTPS traffic. When true, Ngrok only opens the HTTPS endpoint. When false, Ngrok only opens the HTTP endpoint

⁠Contributing

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send a pull request.

If you would like to help take a look at the list of issues⁠.

⁠License

This project is released under the MIT License.
Copyright © Oanh Nguyen⁠
Please see License File⁠ for more information.

Tag summary

Content type

Image

Digest

Size

13.8 MB

Last updated

over 6 years ago

docker pull oanhnn/ngrok:sha-4ccc6b1