SuperVpn / Dockerfile
Mbonea's picture
Update Dockerfile
f3297e4 verified
raw
history blame
653 Bytes
# Use the specified Debian image
FROM docker.io/library/debian:latest
# Install OpenVPN and Easy-RSA
RUN apt-get update && \
apt-get install -y openvpn easy-rsa iptables && \
rm -rf /var/lib/apt/lists/*
# Set up configuration files and keys
COPY openvpn-server.conf /etc/openvpn/server.conf
# Initialize Easy-RSA PKI
RUN make-cadir /etc/openvpn/vars && \
cd /etc/openvpn/vars && \
. ./vars && \
./clean-all && \
./build-ca --batch && \
./build-key-server --batch server && \
./build-dh --batch
# Expose port 1194 for OpenVPN
EXPOSE 1194/udp
# Run OpenVPN server
CMD ["openvpn", "--config", "/etc/openvpn/server.conf"]