This is an image for ngrok which you can run to expose your local machine, or to expose a docker network from a docker compose.
docker run -d --rm -p 4040:4040 -e PORT=80 -e REGION=ap -e TARGET_HOST=<your machine IP> stellarhub/ngrok
This will expose your machine port 80 via a public ngrok http URL
If you need to specify an authentication token for ngrok, please create a .env file with variable name TAG
TAG=xxx_your_token_xxxxx
ngrok:
image: stellarhub/ngrok:latest
ports:
- 4040:4040
environment:
- TARGET_HOST=app
- PORT=80
- REGION=ap
- SUBDOMAIN=uniquename
- AUTHTOKEN=${TAG}
networks:
- YourComposeNetwork
| Environment variable | Description |
|---|---|
| TARGET_HOST | Your target hostname. If used in docker compose, this is the service name. Default 0.0.0.0 |
| REGION | ap default: us |
| AUTHTOKEN | Your ngrok authentication. You should use a .env file and ${TAG} in docker-compose.yaml |
| SUBDOMAIN | Specify an unique domain for ngrok. You must apply AUTHTOKEN to use SUBDOMAIN |
| PORT | The target port. Default 80 |
Content type
Image
Digest
Size
13.9 MB
Last updated
over 5 years ago
docker pull stellarhub/ngrok