1-
1+ #
22# Base image
3+ # @see https://github.com/linuxserver/docker-baseimage-alpine
4+ # @see https://github.com/linuxserver/docker-baseimage-alpine-python3
5+ #
36FROM lsiobase/alpine.python3:latest
47
8+ # Build arguments
9+ ARG BUILD_DATE
10+ ARG VCS_REF
11+ ARG VCS_SRC
12+ ARG VERSION
13+
514#
615# Image labels
716# @see https://github.com/opencontainers/image-spec/blob/master/annotations.md
17+ # @see http://label-schema.org/rc1/
818# @see https://semver.org/
919#
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 <martin.dagarin@gmail.com>" \
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+
1537
1638#
1739# Environment variables
@@ -26,7 +48,6 @@ ENV PATH="/app/bin:$PATH" \
2648 EASYRSA_SAFE_CONF=/config/ssl/safessl-easyrsa.cnf \
2749 EASYRSA_TEMP_FILE=/config/temp \
2850 OVPN_ROOT=/config \
29- OVPN_CONFIG=/config/openvpn \
3051 OVPN_HOOKS=/config/hooks \
3152 OVPN_RUN=system.conf
3253
@@ -42,14 +63,12 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main/" >> /etc/apk/repositor
4263 # Remove any temporary files created by apk
4364 rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* && \
4465 # 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
4967
5068# Add repo files to image
5169COPY root/ /
5270
5371# Configure
5472RUN chmod +x /app/bin/* && \
73+ chmod +x /usr/local/sbin/* && \
5574 chmod -R 0644 /etc/logrotate.d
0 commit comments