This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 92
/
Dockerfile
84 lines (79 loc) · 2 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
# set version label
ARG BUILD_DATE
ARG VERSION
ARG OPENVPNAS_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install dependencies ****" && \
apt-get update && \
apt-get install -y \
bridge-utils \
file \
gnupg \
iproute2 \
iptables \
libatm1 \
libelf1 \
libexpat1 \
libip4tc0 \
libip6tc0 \
libiptc0 \
liblzo2-2 \
libmagic-mgc \
libmagic1 \
libmariadb3 \
libmnl0 \
libmpdec2 \
libmysqlclient20 \
libnetfilter-conntrack3 \
libnfnetlink0 \
libpcap0.8 \
libpython3-stdlib \
libpython3.6-minimal \
libpython3.6-stdlib \
libxtables12 \
mime-support \
multiarch-support \
mysql-common \
net-tools \
python3 \
python3-decorator \
python3-ldap3 \
python3-migrate \
python3-minimal \
python3-mysqldb \
python3-pbr \
python3-pkg-resources \
python3-pyasn1 \
python3-six \
python3-sqlalchemy \
python3-sqlparse \
python3-tempita \
python3.6 \
python3.6-minimal \
sqlite3 \
xz-utils && \
echo "**** add openvpn-as repo ****" && \
curl -s https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add - && \
echo "deb http://as-repository.openvpn.net/as/debian bionic main">/etc/apt/sources.list.d/openvpn-as-repo.list && \
if [ -z ${OPENVPNAS_VERSION+x} ]; then \
OPENVPNAS_VERSION=$(curl -sX GET http://as-repository.openvpn.net/as/debian/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
|grep -A 7 -m 1 "Package: openvpn-as" | awk -F ": " '/Version/{print $2;exit}');\
fi && \
echo "$OPENVPNAS_VERSION" > /version.txt && \
echo "**** ensure home folder for abc user set to /config ****" && \
usermod -d /config abc && \
echo "**** create admin user and set default password for it ****" && \
useradd -s /sbin/nologin admin && \
echo "admin:password" | chpasswd && \
rm -rf \
/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 943/tcp 1194/udp 9443/tcp
VOLUME /config