1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 01:08:37 +00:00

update ShadowVPN

This commit is contained in:
kev 2015-08-07 15:01:34 +08:00
parent e5da6317a8
commit 4cbf4617ed
3 changed files with 60 additions and 22 deletions

@ -2,17 +2,16 @@
# Dockerfile for ShadowVPN # Dockerfile for ShadowVPN
# #
FROM debian:jessie FROM alpine
MAINTAINER kev <noreply@datageek.info> MAINTAINER kev <noreply@datageek.info>
RUN apt-get update \ RUN apk add -U autoconf \
&& apt-get install -y automake \ automake \
build-essential \ build-base \
gawk \ gawk \
git \ git \
net-tools \ iptables \
iptables \ libtool \
libtool \
&& git clone --recursive https://github.com/clowwindy/ShadowVPN.git \ && git clone --recursive https://github.com/clowwindy/ShadowVPN.git \
&& cd ShadowVPN \ && cd ShadowVPN \
&& ./autogen.sh \ && ./autogen.sh \
@ -20,14 +19,13 @@ RUN apt-get update \
&& make install \ && make install \
&& cd .. \ && cd .. \
&& rm -rf ShadowVPN \ && rm -rf ShadowVPN \
&& apt-get purge -y --auto-remove automake \ && apk del autoconf \
build-essential \ automake \
gawk \ build-base \
git \ gawk \
libtool git \
libtool
EXPOSE 1123/udp EXPOSE 1123/udp
VOLUME /etc/shadowvpn
CMD shadowvpn -c /etc/shadowvpn/server.conf CMD shadowvpn -c /etc/shadowvpn/server.conf

@ -0,0 +1,33 @@
#
# Dockerfile for ShadowVPN
#
FROM debian:jessie
MAINTAINER kev <noreply@datageek.info>
RUN apt-get update \
&& apt-get install -y automake \
build-essential \
gawk \
git \
net-tools \
iptables \
libtool \
&& git clone --recursive https://github.com/clowwindy/ShadowVPN.git \
&& cd ShadowVPN \
&& ./autogen.sh \
&& ./configure --enable-static --sysconfdir=/etc \
&& make install \
&& cd .. \
&& rm -rf ShadowVPN \
&& apt-get purge -y --auto-remove automake \
build-essential \
gawk \
git \
libtool
EXPOSE 1123/udp
VOLUME /etc/shadowvpn
CMD shadowvpn -c /etc/shadowvpn/server.conf

@ -1,17 +1,20 @@
ShadowVPN
=========
![](https://badge.imagelayers.io/vimagick/shadowvpn:latest.svg)
[`ShadowVPN`][1] is a fast, safe VPN based on libsodium. [`ShadowVPN`][1] is a fast, safe VPN based on libsodium.
## directory tree ## directory tree
``` ```
~/fig/shadowvpn/ ~/fig/shadowvpn/
.
├── docker-compose.yml ├── docker-compose.yml
└── shadowvpn/ └── server.conf
├── server.conf
├── server_down.sh
└── server_up.sh
``` ```
> Please change password in [server.conf][2] to protect your server.
## docker-compose.yml ## docker-compose.yml
``` ```
@ -20,7 +23,7 @@ shadowvpn:
ports: ports:
- "1123:1123/udp" - "1123:1123/udp"
volumes: volumes:
- "shadowvpn:/etc/shadowvpn" - "server.conf:/etc/shadowvpn/server.conf"
privileged: true privileged: true
restart: always restart: always
``` ```
@ -37,4 +40,8 @@ $ docker-compose up -d
$ shadowvpn -c /etc/shadowvpn/client.conf -v $ shadowvpn -c /etc/shadowvpn/client.conf -v
``` ```
> Change settings in [client.conf][3].
[1]: https://shadowvpn.org/ [1]: https://shadowvpn.org/
[2]: https://github.com/clowwindy/ShadowVPN/blob/master/samples/server.conf
[2]: https://github.com/clowwindy/ShadowVPN/blob/master/samples/client.conf