-
Notifications
You must be signed in to change notification settings - Fork 143
/
Dockerfile
48 lines (40 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM alpine:3.12
MAINTAINER Werner Beroux <werner@beroux.com>
# https://github.com/sgerrand/alpine-pkg-glibc
ARG GLIBC_VERSION=2.31-r0
RUN set -x \
&& apk add --no-cache -t .deps ca-certificates \
# Install glibc on Alpine (required by docker-compose)
# See also https://github.com/gliderlabs/docker-alpine/issues/11
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk \
&& apk add glibc-${GLIBC_VERSION}.apk \
&& rm glibc-${GLIBC_VERSION}.apk \
&& apk del --purge .deps
RUN set -x \
# Install ngrok (latest official stable from https://ngrok.com/download).
&& apk add --no-cache curl \
&& APKARCH="$(apk --print-arch)" \
&& case "$APKARCH" in \
armhf) NGROKARCH="arm" ;; \
armv7) NGROKARCH="arm" ;; \
armel) NGROKARCH="arm" ;; \
x86) NGROKARCH="386" ;; \
x86_64) NGROKARCH="amd64" ;; \
esac \
&& curl -Lo /ngrok.tgz https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-$NGROKARCH.tgz \
&& tar -xzf /ngrok.tgz \
&& mv /ngrok /bin \
&& chmod 755 /bin/ngrok \
&& rm -f /ngrok.tgz \
# Create non-root user.
&& adduser -h /home/ngrok -D -u 6737 ngrok
# Add config script.
COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/
COPY entrypoint.sh /
USER ngrok
ENV USER=ngrok
# Basic sanity check.
RUN ngrok --version
EXPOSE 4040
CMD ["/entrypoint.sh"]