forked from Stanback/alpine-strongswan-vpn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
81 lines (70 loc) · 2.14 KB
/
Dockerfile
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
73
74
75
76
77
78
79
80
81
#
# StrongSwan VPN + Alpine Linux
#
FROM alpine:edge
ARG STRONGSWAN_RELEASE="https://download.strongswan.org/strongswan-5.5.1.tar.bz2"
RUN apk --update add build-base \
ca-certificates \
curl \
bash \
rsync \
ip6tables \
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-chapoly \
--enable-cmd \
--enable-dhcp \
--enable-eap-dynamic \
--enable-eap-identity \
--enable-eap-md5 \
--enable-eap-mschapv2 \
--enable-eap-radius \
--enable-eap-tls \
--enable-farp \
--enable-files \
--enable-gcm \
--enable-md4 \
--enable-newhope \
--enable-ntru \
--enable-openssl \
--enable-sha3 \
--enable-shared \
--disable-aes \
--disable-des \
--disable-gmp \
--disable-hmac \
--disable-ikev1 \
--disable-md5 \
--disable-rc2 \
--disable-sha1 \
--disable-sha2 \
--disable-static && \
make && \
make install && \
rm -rf /tmp/* && \
apk del build-base curl openssl-dev && \
rm -rf /var/cache/apk/*
COPY ./bin/ovw /usr/local/bin/ovw
RUN chmod a+x /usr/local/bin/*
RUN echo ". /etc/profile" > /root/.bashrc
RUN echo "alias ll='ls -alF'" >> /etc/profile
#RUN echo "export PS1='\H:\w\\$ '" >> /etc/profile
RUN echo 'export TERM="xterm"' >> /etc/profile
COPY ./entry.sh /entry.sh
RUN chmod a+x /entry.sh
EXPOSE 500/udp \
4500/udp
ENTRYPOINT ["/entry.sh"]
CMD ["/usr/sbin/ipsec", "start", "--nofork"]
#CMD ["/entry.sh"]