forked from monstrenyatko/docker-openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 827 Bytes
/
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
FROM monstrenyatko/alpine
LABEL maintainer="Oleg Kovalenko <[email protected]>"
RUN apk update && \
apk add iptables ip6tables openvpn && \
# clean-up
rm -rf /root/.cache && mkdir -p /root/.cache && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
ENV APP_NAME="vpnc-app" \
APP_BIN="/usr/sbin/openvpn" \
APP_USERNAME="root" \
APP_GROUPNAME="openvpn"
COPY run.sh firewall.sh firewall6.sh routing.sh routing6.sh /app/
RUN chown -R root:root /app
RUN chmod -R 0644 /app
RUN find /app -type d -exec chmod 0755 {} \;
RUN find /app -type f -name '*.sh' -exec chmod 0755 {} \;
HEALTHCHECK --interval=60s --timeout=15s --start-period=120s \
CMD curl -L 'https://api.ipify.org'
WORKDIR /config
ENTRYPOINT ["/app/run.sh"]
CMD ["vpnc-app", "--config", "/config/client.ovpn"]