From 955515af692b759cb441e4aa466b06a51341e9e5 Mon Sep 17 00:00:00 2001 From: Werner Beroux Date: Wed, 29 Jun 2016 07:55:26 +0200 Subject: [PATCH] Update README.md --- README.md | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8c3ad1b..a474d25 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,25 @@ A [Docker][docker] image for [ngrok][ngrok] v2, introspected tunnels to localhos It's based on the excellent work of [wizardapps/ngrok][wizardapps/ngrok] and [fnichol/ngrok][fnichol/ngrok]. -### Features +## Features * **Small**: Built using [busybox][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). -### Configuration - -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_AUTH` - Authentication key 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_DOMAIN` - Paying Ngrok customers can specify a custom domain. Only one subdomain or domain can be specified, with the domain taking priority. - * `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` 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. +## Configuration To see command-line options, run `docker run --rm wernight/ngrok --help`. -### Usage +## 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 + #### Full example 1. We'll set up a simple example HTTP server in a docker container named `www`: @@ -55,7 +45,8 @@ Supposing you've an Apache or Nginx Docker container named `web_service_containe $ xdg-open http://$(docker port www_ngrok 4040) -#### Helper + +### Helper For common cases you may want to create an alias in your `~/.profile` (or `~/.bashrc`, `~/.zshrc`, or equivalent): @@ -68,7 +59,24 @@ For common cases you may want to create an alias in your `~/.profile` (or `~/.ba Then to the simple example just do `docker-ngrok web_service_container`. -### Feedbacks +## Deprecated environment variables + +*Please consider using directly the command-line arguments of Ngrok and if you feel that envrionment variables as below +are really useful to you, add a ticket.* + +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_AUTH` - Authentication key 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_DOMAIN` - Paying Ngrok customers can specify a custom domain. Only one subdomain or domain can be specified, with the domain taking priority. + * `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` 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. + + +## Feedbacks Report issues/questions/feature requests on [GitHub Issues][issues].