-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (35 loc) · 868 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM debian:bookworm-slim
LABEL maintainer="Jan Ole Suhr <ole@janole.com>"
ENV DEBIAN_FRONTEND noninteractive
RUN true \
#
# Update package list
#
&& apt-get update \
#
# Install all necessary packages
#
&& apt-get install -y openvpn iptables gettext dumb-init \
#
# Clean-up ...
#
&& rm -rf /var/lib/apt/lists/*
ENV CADIR=/conf/ca
ENV VPNDIR=/conf/openvpn
ENV CLIENTSDIR=/conf/clients
ENV TEMPLATESDIR=/.templates
ENV VPNCAFILE=${VPNDIR}/ca.crt
ENV VPNKEYFILE=${VPNDIR}/vpn.key
ENV VPNCERTFILE=${VPNDIR}/vpn.crt
ENV VPNDHFILE=${VPNDIR}/dh.pem
ENV VPNTAKEYFILE=${VPNDIR}/ta.key
ENV UDPCONF=${VPNDIR}/udp-server.conf
ENV TCPCONF=${VPNDIR}/tcp-server.conf
ENV VPN_PORT=1194
ENV CA_COUNTRY=US
ENV VPN_COUNTRY=US
ENV CLIENT_COUNTRY=US
COPY ./templates ${TEMPLATESDIR}/
COPY ./scripts/* /
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start-vpn.sh"]