From 872daf2a3a4415138b38665780317cb9764ffd47 Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 5 Dec 2015 11:37:54 +0800 Subject: [PATCH] update ngrokd --- ngrokd/README.md | 59 +++++++++++++++++++++++++++++++++++---- ngrokd/docker-compose.yml | 12 ++++++-- 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/ngrokd/README.md b/ngrokd/README.md index 504c257..7fc60da 100644 --- a/ngrokd/README.md +++ b/ngrokd/README.md @@ -1,15 +1,64 @@ ngrokd ====== +![](https://badge.imagelayers.io/vimagick/ngrokd:latest.svg) + [ngrok][1] is a reverse proxy that creates a secure tunnel from a public endpoint to a locally running web service. ngrok captures and analyzes all traffic over the tunnel for later inspection and replay. -**IMPORTANT**: +## docker-compose.yml -- Change `NGROK_BASE_DOMAIN` in `Dockerfile` -- Rebuild the image -- Run container -- Copy binaries/keys from container +``` +data: + build: . + entrypoint: /bin/true + +service: + image: debian:jessie + command: > + ./ngrokd + -domain=ngrok.foobar.site + -httpAddr=:2080 + -httpsAddr=:2443 + -tunnelAddr=:4443 + -tlsCrt=snakeoil.crt + -tlsKey=snakeoil.key + -log-level=INFO + ports: + - "2080:2080" + - "2443:2443" + - "4443:4443" + volumes: + - ./ngrok:/ngrok + working_dir: /ngrok + restart: always +``` + +## up and running + +``` +$ mkdir -p ~/fig/ngrokd/ +$ cd ~/fig/ngrokd/ +$ wget https://github.com/vimagick/dockerfiles/raw/master/ngrokd/docker-compose.yml +$ wget https://github.com/vimagick/dockerfiles/raw/master/ngrokd/Dockerfile +$ vim Dockerfile + +$ docker-compose build data +$ docker-compose up -d data +$ docker cp ngrokd_data_1:/ngrok . +$ docker-compose rm -v data + +$ docker-compose up -d service +$ docker-compose logs service +``` + +## important notes + +- [vimagick/ngrokd][2] should not be used directly +- Change `NGROK_BASE_DOMAIN` in [Dockerfile][3] +- Nerver push it to public repo [1]: https://github.com/inconshreveable/ngrok +[2]: https://hub.docker.com/r/vimagick/ngrokd/ +[3]: https://github.com/vimagick/dockerfiles/raw/master/ngrokd/Dockerfile#L9 diff --git a/ngrokd/docker-compose.yml b/ngrokd/docker-compose.yml index c966562..f95b617 100644 --- a/ngrokd/docker-compose.yml +++ b/ngrokd/docker-compose.yml @@ -1,6 +1,11 @@ -ngrokd: - image: vimagick/ngrokd +data: + build: . + entrypoint: /bin/true + +service: + image: debian:jessie command: > + ./ngrokd -domain=ngrok.foobar.site -httpAddr=:2080 -httpsAddr=:2443 @@ -12,4 +17,7 @@ ngrokd: - "2080:2080" - "2443:2443" - "4443:4443" + volumes_from: + - data + working_dir: /ngrok restart: always