Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM alpine:3.9
MAINTAINER Werner Beroux <werner@beroux.com>

RUN apk add --update coreutils && rm -rf /var/cache/apk/*
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use apk add --no-cache coreutils. It does the --update and avoids rm -rf ...

RUN set -x && \
apk add --no-cache -t .deps ca-certificates && \
# Install glibc on Alpine (required by docker-compose) from
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Additionally, you can specify one of several environment variable (via `-e`) to
* `NGROK_REGION` - Location of the ngrok tunnel server; can be `us` (United States, default), `eu` (Europe), `ap` (Asia/Pacific) or `au` (Australia)
* `NGROK_LOOK_DOMAIN` - This is the domain name referred to by ngrok. (default: localhost).
* `NGROK_BINDTLS` - Toggle tunneling only HTTP or HTTPS traffic. When `true`, Ngrok only opens the HTTPS endpoint. When `false`, Ngrok only opens the HTTP endpoint
* `NGROK_TIMEOUT` - Kill the ngrok process after the timeout value (typically `24h`). Quite handy to use with the `restart: on-failure` option in your docker-compose.yml

#### Full example

Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fi

ARGS="ngrok"

if [ -n "$NGROK_TIMEOUT" ]; then
ARGS="timeout $NGROK_TIMEOUT $ARGS"
fi

# Set the protocol.
if [ "$NGROK_PROTOCOL" = "TCP" ]; then
ARGS="$ARGS tcp"
Expand Down