1
-
1
+ #
2
2
# Base image
3
+ # @see https://github.com/linuxserver/docker-baseimage-alpine
4
+ # @see https://github.com/linuxserver/docker-baseimage-alpine-python3
5
+ #
3
6
FROM lsiobase/alpine.python3:latest
4
7
8
+ # Build arguments
9
+ ARG BUILD_DATE
10
+ ARG VCS_REF
11
+ ARG VCS_SRC
12
+ ARG VERSION
13
+
5
14
#
6
15
# Image labels
7
16
# @see https://github.com/opencontainers/image-spec/blob/master/annotations.md
17
+ # @see http://label-schema.org/rc1/
8
18
# @see https://semver.org/
9
19
#
10
- LABEL org.opencontainers.image.title = "OpenVPN Server" \
11
- org.opencontainers.image.description = "Docker image with OpenVPN server" \
12
- org.opencontainers.image.url = "" \
13
- org.opencontainers.image.authors = "Martin Dagarin <>" \
14
- org.opencontainers.image.version = "0.0.2"
20
+ LABEL org.opencontainers.image.title="OpenVPN Server" \
21
+ org.label-schema.name="OpenVPN Server" \
22
+ org.opencontainers.image.description="Docker image with OpenVPN server" \
23
+ org.label-schema.description="Docker image with OpenVPN server" \
24
+ org.opencontainers.image.url="https://github.com/SloCompTech/docker-openvpn" \
25
+ org.label-schema.url="https://github.com/SloCompTech/docker-openvpn" \
26
+ org.opencontainers.image.authors=
"Martin Dagarin <[email protected] >" \
27
+ org.opencontainers.image.version=$VERSION \
28
+ org.label-schema.version=$VERSION \
29
+ org.opencontainers.image.revision=$VCS_REF \
30
+ org.label-schema.vcs-ref=$VCS_REF \
31
+ org.opencontainers.image.source=$VCS_SRC \
32
+ org.label-schema.vcs-url=$VCS_SRC \
33
+ org.opencontainers.image.created=$BUILD_DATE \
34
+ org.label-schema.build-date=$BUILD_DATE \
35
+ org.label-schema.schema-version="1.0"
36
+
15
37
16
38
#
17
39
# Environment variables
@@ -26,7 +48,6 @@ ENV PATH="/app/bin:$PATH" \
26
48
EASYRSA_SAFE_CONF=/config/ssl/safessl-easyrsa.cnf \
27
49
EASYRSA_TEMP_FILE=/config/temp \
28
50
OVPN_ROOT=/config \
29
- OVPN_CONFIG=/config/openvpn \
30
51
OVPN_HOOKS=/config/hooks \
31
52
OVPN_RUN=system.conf
32
53
@@ -42,14 +63,12 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main/" >> /etc/apk/repositor
42
63
# Remove any temporary files created by apk
43
64
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* && \
44
65
# Add permission for network management to user abc
45
- echo "abc ALL=(ALL) NOPASSWD: /sbin/ip" >> /etc/sudoers && \
46
- # Create tunnel interface
47
- mkdir -p /dev/net && \
48
- mknod /dev/net/tun c 10 200
66
+ echo "abc ALL=(ALL) NOPASSWD: /sbin/ip, /sbin/iptables" >> /etc/sudoers
49
67
50
68
# Add repo files to image
51
69
COPY root/ /
52
70
53
71
# Configure
54
72
RUN chmod +x /app/bin/* && \
73
+ chmod +x /usr/local/sbin/* && \
55
74
chmod -R 0644 /etc/logrotate.d
0 commit comments