35 lines
1 KiB
Text
35 lines
1 KiB
Text
FROM resin/raspberrypi3-alpine
|
|
|
|
LABEL org.opencontainers.image.description="Docker-Ngrok" \
|
|
org.opencontainers.image.authors="HHF Technology (https://forum.hhf.technology/)" \
|
|
org.opencontainers.image.url="https://git.hhf.technology/hhf/docker-ngrok" \
|
|
org.opencontainers.image.documentation="https://git.hhf.technology/hhf/docker-ngrok" \
|
|
org.opencontainers.image.source="https://git.hhf.technology/hhf/docker-ngrok"
|
|
|
|
|
|
RUN [ "cross-build-start" ]
|
|
|
|
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-arm.zip \
|
|
&& unzip -o /ngrok.zip -d /bin \
|
|
&& rm -f /ngrok.zip \
|
|
# 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 /
|
|
|
|
# Basic sanity check.
|
|
RUN su ngrok -c 'ngrok --version'
|
|
|
|
RUN [ "cross-build-end" ]
|
|
|
|
USER ngrok
|
|
ENV USER=ngrok
|
|
|
|
EXPOSE 4040
|
|
|
|
CMD ["/entrypoint.sh"]
|