Set default CMD in Dockerfiles
This commit is contained in:
parent
05d7462a79
commit
70e67bdad9
|
@ -14,3 +14,4 @@ RUN apk add --update bash easy-rsa && \
|
|||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
||||
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.3-rc.1/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \
|
||||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
||||
CMD ["/app/ovpn-admin", "--debug", "--ovpn.network=172.16.100.0/22", "--master.sync-token=TOKEN", "--easyrsa.path=/mnt/easyrsa", "--easyrsa.index-path=/mnt/easyrsa/pki/index.txt", "--ovpn.server=127.0.0.1:7777:tcp"]
|
||||
|
|
|
@ -5,3 +5,4 @@ RUN apk add --update bash openvpn easy-rsa && \
|
|||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
||||
COPY setup/ /etc/openvpn/setup
|
||||
RUN chmod +x /etc/openvpn/setup/configure.sh
|
||||
CMD ["/etc/openvpn/setup/configure.sh"]
|
||||
|
|
|
@ -6,7 +6,6 @@ services:
|
|||
context: .
|
||||
dockerfile: Dockerfile.openvpn
|
||||
image: openvpn:local
|
||||
command: /etc/openvpn/setup/configure.sh
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ports:
|
||||
|
@ -19,7 +18,6 @@ services:
|
|||
build:
|
||||
context: .
|
||||
image: ovpn-admin:local
|
||||
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="127.0.0.1:7777:tcp"
|
||||
network_mode: service:openvpn
|
||||
volumes:
|
||||
- ./easyrsa_master:/mnt/easyrsa
|
||||
|
|
Loading…
Reference in New Issue