-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (46 loc) · 1.83 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
49
50
51
52
53
54
55
56
57
# syntax=docker/dockerfile:1
FROM alpine:latest
LABEL org.opencontainers.image.source="https://github.com/rooty/proxy-vpn-wg"
LABEL org.opencontainers.image.description="WireGuard+Proxy"
LABEL org.opencontainers.image.licenses=MIT
# Install packages
RUN apk --no-cache add \
runit \
curl \
bash \
wireguard-tools-wg-quick \
openresolv \
iptables \
# Bring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
&& runDeps="$( \
scanelf --needed --nobanner /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache $runDeps \
&& apk del .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
# Remove alpine cache \
&& rm -rf /var/cache/apk/*
# \
# Make sure files/folders needed by the processes are accessable when they run under the nobody user \
# && chown -R nobody.nobody /run
RUN curl -L -qs https://github.com/SenseUnit/dumbproxy/releases/download/v1.14.0/dumbproxy.linux-amd64 --output /usr/local/bin/dumbproxy && chmod +x /usr/local/bin/dumbproxy
# Add configuration files
COPY --chown=nobody rootfs/ /
# Add application
WORKDIR /etc/openvpn
# Expose the port nginx is reachable on
EXPOSE 8888
# Let runit start nginx & php-fpm
# Ensure /bin/docker-entrypoint.sh is always executed
ENTRYPOINT ["/bin/docker-entrypoint.sh"]
# Configure a healthcheck to validate that everything is up&running
#HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping || exit 1