-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathDockerfile
37 lines (30 loc) · 1014 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
FROM ubuntu:23.04
MAINTAINER Brian Lycett <[email protected]>
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates gnupg && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
easy-rsa \
fail2ban \
ipcalc \
iptables \
libpam-google-authenticator \
libpam-ldapd \
net-tools \
nslcd \
openssl \
openvpn && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* && \
mkdir /opt/easyrsa && \
cp -rp /usr/share/easy-rsa/x509-types /opt/easyrsa/ && \
cp -rp /usr/share/easy-rsa/easyrsa /opt/easyrsa/
EXPOSE 1194/udp
EXPOSE 5555/tcp
ADD ./files/bin /usr/local/bin
RUN chmod a+x /usr/local/bin/*
ADD ./files/configuration /opt/configuration
ADD ./files/etc/pam.d/openvpn* /opt/
ADD ./files/easyrsa/* /opt/easyrsa/
# Use a volume for data persistence
VOLUME /etc/openvpn
CMD ["/usr/local/bin/entrypoint"]