This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
forked from senorgeneral/docker-ngrok
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
48 lines (40 loc) · 1.53 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 <[email protected]>
RUN set -x && \
apk add --no-cache -t .deps ca-certificates && \
# Install glibc on Alpine (required by docker-compose) from
# https://github.com/sgerrand/alpine-pkg-glibc
# 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/2.29-r0/glibc-2.29-r0.apk && \
apk add glibc-2.29-r0.apk && \
rm glibc-2.29-r0.apk && \
apk del --purge .deps
RUN set -x \
# Install ngrok (latest official stable from https://ngrok.com/download).
&& apk add --no-cache curl \
&& curl -Lo /ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip \
&& unzip -o /ngrok.zip -d /bin \
&& rm -f /ngrok.zip \
# Create non-root user.
&& adduser -h /home/ngrok -D -u 6737 ngrok
RUN set -x \
# install python 3 and plexapi
&& apk add --no-cache python3 \
&& python3 -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
&& if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi \
&& if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi \
&& rm -r /root/.cache \
&& pip3 install plexapi \
&& apk add nano
# Add config script.
COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/
COPY entrypoint.sh /
COPY plexurl.py /
RUN chmod +x plexurl.py
USER ngrok
ENV USER=ngrok
EXPOSE 4040
CMD ["/entrypoint.sh"]