-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Dockerfile
35 lines (27 loc) · 1.12 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
# Start from Alpine base image
FROM alpine
LABEL maintainer="Mr.Philipp <[email protected]>"
LABEL version="0.5.4"
# Set the working directory to /opt/app
WORKDIR /opt/app
RUN apk --no-cache --no-progress upgrade && apk --no-cache --no-progress add bash bind-tools oath-toolkit-oathtool curl ip6tables iptables openvpn easy-rsa
#Install Latest RasyRSA Version
RUN chmod 755 /usr/share/easy-rsa/*
# Copy all files in the current directory to the /opt/app directory in the container
COPY bin /opt/app/bin
COPY docker-entrypoint.sh /opt/app/docker-entrypoint.sh
RUN mkdir -p /opt/app/clients \
/opt/app/db \
/opt/app/log \
/opt/app/pki \
/opt/app/staticclients \
/opt/app/config
# Add the openssl-easyrsa.cnf file to the easy-rsa directory
ADD openssl-easyrsa.cnf /opt/app/easy-rsa/
# Make all files in the bin directory executable
RUN chmod +x bin/*; chmod +x docker-entrypoint.sh
# Expose the OpenVPN port (1194/udp)
EXPOSE 1194/udp
# Set the entrypoint to the docker-entrypoint.sh script, passing in the following arguments:
# $REQ_COUNTRY $REQ_PROVINCE $REQ_CITY $REQ_ORG $REQ_OU $REQ_CN
ENTRYPOINT ./docker-entrypoint.sh