Skip to content

Commit

Permalink
add basic docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
siomiz committed Sep 5, 2018
1 parent 99c4b0d commit 2d199b1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN yum -y update \
&& ./configure \
&& make \
&& make install \
&& touch /usr/vpnserver/vpn_server.config \
&& zip -r9 /artifacts.zip /usr/vpn* /usr/bin/vpn*

FROM centos:7
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apk add -U build-base ncurses-dev openssl-dev readline-dev zip \
&& ./configure \
&& make \
&& make install \
&& touch /usr/vpnserver/vpn_server.config \
&& zip -r9 /artifacts.zip /usr/vpn* /usr/bin/vpn*

FROM alpine:3.7
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN apt-get update \
&& ./configure \
&& make \
&& make install \
&& touch /usr/vpnserver/vpn_server.config \
&& zip -r9 /artifacts.zip /usr/vpn* /usr/bin/vpn*

FROM debian:9-slim
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN apt-get update \
&& ./configure \
&& make \
&& make install \
&& touch /usr/vpnserver/vpn_server.config \
&& zip -r9 /artifacts.zip /usr/vpn* /usr/bin/vpn*

FROM ubuntu:18.04
Expand Down
8 changes: 7 additions & 1 deletion copyables/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ then
fi
set -e

if [ ! -f /usr/vpnserver/vpn_server.config ]; then
CONFIG=/usr/vpnserver/vpn_server.config

if [ ! -f $CONFIG ] || [ ! -s $CONFIG ]; then

: ${PSK:='notasecret'}

Expand Down Expand Up @@ -178,6 +180,10 @@ set -e

echo \# [initial setup OK]

else

echo \# [running with existing config]

fi

if [[ -d "/opt/scripts/" ]]; then
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

services:
app:
image: siomiz/softethervpn
volumes:
- ./vpn_server.config:/usr/vpnserver/vpn_server.config
cap_add:
- NET_ADMIN
ports:
- 500:500/udp
- 4500:4500/udp
- 1701:1701/tcp
- 1194:1194/udp
- 5555:5555/tcp
Empty file added vpn_server.config
Empty file.

0 comments on commit 2d199b1

Please sign in to comment.