-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
34 lines (27 loc) · 1.09 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
# Copyright 2024 OpenVPN Inc <[email protected]>
# SPDX-License-Identifier: Apache-2.0
#
FROM --platform=$TARGETPLATFORM ubuntu:22.04
ARG TARGETPLATFORM
ARG VERSION
ARG DEBIAN_FRONTEND="noninteractive"
LABEL maintainer="[email protected]"
RUN apt-get update && \
apt-get install -y \
ca-certificates \
wget \
gnupg \
net-tools \
iptables \
systemctl
RUN wget https://as-repository.openvpn.net/as-repo-public.asc -qO /etc/apt/keyrings/as-repository.asc && \
echo "deb [arch=${TARGETPLATFORM#linux/} signed-by=/etc/apt/keyrings/as-repository.asc] http://as-repository.openvpn.net/as/debian jammy main">/etc/apt/sources.list.d/openvpn-as-repo.list && \
apt update && apt -y install openvpn-as=$VERSION && \
apt clean
RUN mkdir -p /openvpn /ovpn/tmp /ovpn/sock && \
sed -i 's#~/tmp#/ovpn/tmp#g;s#~/sock#/ovpn/sock#g' /usr/local/openvpn_as/etc/as_templ.conf
EXPOSE 943/tcp 1194/udp 443/tcp
VOLUME /openvpn
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/local/openvpn_as/scripts/openvpnas", "--nodaemon", "--pidfile=/ovpn/tmp/openvpn.pid"]