forked from cybertk/ck-vpn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.docker
72 lines (64 loc) · 1.96 KB
/
build.docker
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM alpine
LABEL MAINTAINER="vpn@ifree.net"
ENV STRONGSWAN_RELEASE https://download.strongswan.org/strongswan.tar.bz2
RUN apk update && apk upgrade
RUN apk add build-base \
curl \
iproute2 \
iptables-dev \
openssl \
openssl-dev && \
mkdir -p /tmp/strongswan && \
curl -Lo /tmp/strongswan.tar.bz2 $STRONGSWAN_RELEASE && \
tar --strip-components=1 -C /tmp/strongswan -xjf /tmp/strongswan.tar.bz2 && \
cd /tmp/strongswan && \
./configure --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--with-ipsecdir=/usr/lib/strongswan \
--enable-aesni \
--enable-eap-identity \
--enable-eap-mschapv2 \
--enable-eap-tls \
--enable-openssl \
--disable-x509 \
--disable-pem \
--disable-constraints \
--disable-revocation \
--disable-scepclient \
--disable-aes \
--disable-des \
--disable-rc2 \
--disable-gmp \
--disable-hmac \
--disable-xcbc \
--disable-cmac \
--disable-ikev1 \
--disable-sha1 \
--disable-updown \
--disable-curl \
--disable-pki \
--disable-pkcs1 \
--disable-pkcs7 \
--disable-pkcs8 \
--disable-pkcs12 \
--disable-pubkey \
--disable-curve25519 \
--disable-eap-radius \
--disable-ldap && \
make LDFLAGS+=-s -j install && \
rm -rf /tmp/* && \
apk del build-base curl-dev openssl-dev iptables-dev && \
rm -rf /var/cache/apk/*
# Strongswan Configuration
ADD ./vpn_config/ipsec.conf /etc/ipsec.conf
ADD ./vpn_config/strongswan.conf /etc/strongswan.conf
# Apps
ADD init.sh /usr/bin/init
# Web
#ADD web /www
#VOLUME /www
ENV PROFILE StrongSwan
ENV PSK asdfjkl
EXPOSE 500/udp 4500/udp
CMD /usr/bin/init