From 8740d2420ba3838dd6346f55f154b1ae61a73223 Mon Sep 17 00:00:00 2001 From: lastlink Date: Thu, 1 Jun 2023 18:13:07 -0400 Subject: [PATCH 1/3] Dockerfile.openvpn use git to pull setup directly in container to avoid line ending bugs on windows --- Dockerfile.openvpn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.openvpn b/Dockerfile.openvpn index ce80f40..b45836a 100644 --- a/Dockerfile.openvpn +++ b/Dockerfile.openvpn @@ -1,7 +1,9 @@ FROM alpine:3.16 -RUN apk add --update bash openvpn easy-rsa iptables && \ +RUN apk add --update bash openvpn easy-rsa iptables git && \ ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \ wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.4/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \ rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* -COPY setup/ /etc/openvpn/setup +RUN git clone https://github.com/flant/ovpn-admin.git /tmp/ovpn-admin +RUN cp -r /tmp/ovpn-admin/setup /etc/openvpn/setup + RUN chmod +x /etc/openvpn/setup/configure.sh From f016968c9a1b9a2c372d6a37192392f44f4ca099 Mon Sep 17 00:00:00 2001 From: lastlink Date: Thu, 1 Jun 2023 18:14:50 -0400 Subject: [PATCH 2/3] Create start.ps1 --- start.ps1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 start.ps1 diff --git a/start.ps1 b/start.ps1 new file mode 100644 index 0000000..c2e226c --- /dev/null +++ b/start.ps1 @@ -0,0 +1 @@ +docker-compose -p openvpn-master up -d --build From 36bafb103dc5ade932ff73668f26ab2aeae146cd Mon Sep 17 00:00:00 2001 From: lastlink Date: Thu, 1 Jun 2023 18:15:42 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4468a8d..c900e07 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,18 @@ You need [Docker](https://docs.docker.com/get-docker/) and [docker-compose](http Commands to execute: +* bash ```bash git clone https://github.com/flant/ovpn-admin.git cd ovpn-admin ./start.sh ``` +* powershell +```bash +git clone https://github.com/flant/ovpn-admin.git +cd ovpn-admin +./start.ps1 +``` #### 1.1 Ready docker images available on [Docker Hub](https://hub.docker.com/r/flant/ovpn-admin/tags) . Tags are simple: `$VERSION` or `latest` for ovpn-admin and `openvpn-$VERSION` or `openvpn-latest` for openvpn-server