{"id":13618134,"url":"https://github.com/shkoliar/docker-ngrok","last_synced_at":"2025-04-09T20:57:17.095Z","repository":{"id":38376883,"uuid":"190928485","full_name":"shkoliar/docker-ngrok","owner":"shkoliar","description":"Expose a local web server or docker environment to the internet","archived":false,"fork":false,"pushed_at":"2023-11-04T01:07:34.000Z","size":14,"stargazers_count":118,"open_issues_count":4,"forks_count":31,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T20:57:08.439Z","etag":null,"topics":["busybox","cli","command-line","developer-tools","development","development-environment","devops","devops-tools","docker","docker-compose","docker-container","docker-image","environment-variables","glibc","local-development","mit","mit-license","ngrok","worksonmymachine"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shkoliar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-06-08T19:45:42.000Z","updated_at":"2025-02-08T15:50:44.000Z","dependencies_parsed_at":"2024-03-31T00:31:08.725Z","dependency_job_id":"85adfbab-4386-46a8-b273-d9aa59e332f1","html_url":"https://github.com/shkoliar/docker-ngrok","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shkoliar%2Fdocker-ngrok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shkoliar%2Fdocker-ngrok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shkoliar%2Fdocker-ngrok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shkoliar%2Fdocker-ngrok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shkoliar","download_url":"https://codeload.github.com/shkoliar/docker-ngrok/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111950,"owners_count":21049577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["busybox","cli","command-line","developer-tools","development","development-environment","devops","devops-tools","docker","docker-compose","docker-container","docker-image","environment-variables","glibc","local-development","mit","mit-license","ngrok","worksonmymachine"],"created_at":"2024-08-01T20:01:55.109Z","updated_at":"2025-04-09T20:57:17.072Z","avatar_url":"https://github.com/shkoliar.png","language":"Dockerfile","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Docker Ngrok\n\nA Docker image for [ngrok](https://ngrok.com) service to expose a local docker environment or any other local server to the public internet over secure tunnels. The image is built using official [busybox:glibc](https://hub.docker.com/_/busybox) docker image, so no third party libraries are used, only official busybox and ngrok binary.\n\n## Usage\n\n### Command-line\n\n**Example**  \nThe example below assumes that you have running web server docker container named `dev_web_1` with exposed port `80`.\n\n```bash\ndocker run --rm -it --link dev_web_1 shkoliar/ngrok http dev_web_1:80\n```\n\nWith command line usage, ngrok session is active until it won't be terminated by `Ctrl+C` combination.\n\n#### Command details\n\n**Using ngrok parameters**\n\n```bash\ndocker run --rm -it --link \u003cweb-container-name\u003e [--net \u003cdefault-netowrk-name\u003e] shkoliar/ngrok \u003cngrok-parameters\u003e \u003cweb-container-name\u003e:\u003cport\u003e\n```\n\nFor information about ngrok parameters, please refer to [ngrok documentation](https://ngrok.com/docs).\n\n**Passing parameters to ngrok via env variables**\n\n```bash\ndocker run --rm -it --link \u003cweb-container-name\u003e [--net \u003cdefault-netowrk-name\u003e] --env DOMAIN=\u003cweb-container-name\u003e --env PORT=\u003cport\u003e shkoliar/ngrok\n```\n\nAvailable env variables can be found below, at [environment variables](#environment-variables) section.\n\n#### Troubleshooting\n\n_If you are getting an error like_\n\n```bash\ndocker: Error response from daemon: Cannot link to /dev_web_1, as it does not belong to the default network.\n```\n\n_You need to specify default docker network, for example_\n\n```bash\ndocker run --rm -it --link dev_web_1 --net dev_default shkoliar/ngrok http dev_web_1:80\n```\n\n### As part of docker-compose.yml file\n\n```yaml\nngrok:\n  image: shkoliar/ngrok:latest\n  ports:\n    - 4551:4551\n  links:\n    - web\n  environment:\n    - DOMAIN=web\n    - PORT=80\n```\n\nWhere `web` in example above is a web server service name of this docker-compose.yml file.\n\nIf ngrok container is created as part of docker-compose.yml file, ngrok session is active while container is running. To restart or stop session, you will need to restart or stop container respectively.\nNgrok web interface available at `http://localhost:4551`.\n\n## Environment variables\n\nList of available environment variables to configure ngrok in command line usage or as part of docker-compose.yml file.\n\n| Name        | Values                     | Default   | Information                                                                                                                                                 |\n| :---------- | :------------------------- | :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| PROTOCOL    | http, tls, tcp             | http      | Ngrok tunneling protocol.                                                                                                                                   |\n| DOMAIN      | \\*                         | localhost | Hostname or docker container, service name which is referred to by ngrok.                                                                                   |\n| PORT        | \\*                         | 80        | Port which is referred to by ngrok.                                                                                                                         |\n| REGION      | us, eu, ap, au, sa, jp, in | us        | Region where the ngrok client will connect to host its tunnels.                                                                                             |\n| HOST_HEADER | \\*                         |           | Optional, rewrite incoming HTTP requests with a modified Host header. e.g. `HOST_HEADER=localdev.test`                                                      |\n| BIND_TLS    | true, false                |           | Optional, forward only HTTP or HTTPS traffic, but not both. By default, when ngrok runs an HTTP tunnel, it opens endpoints for both HTTP and HTTPS traffic. |\n| SUBDOMAIN   | \\*                         |           | Optional, specifies the subdomain to use with ngrok, if unspecified ngrok with generate a unique subdomain on each start.                                   |\n| AUTH_TOKEN  | \\*                         |           | Optional, token used to authorise your subdomain with ngrok.                                                                                                 |\n| DEBUG       | true                       |           | Optional, write logs to stdout.                                                                                                                             |\n| PARAMS      | \\*                         |           | Pass all ngrok parameters by one string. When specified, any other env variables are skipped (Except AUTH_TOKEN).|\n\nFor more information about ngrok parameters, please refer to [ngrok documentation](https://ngrok.com/docs).\n\n## License\n\n[MIT](../../blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshkoliar%2Fdocker-ngrok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshkoliar%2Fdocker-ngrok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshkoliar%2Fdocker-ngrok/lists"}