-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.client
41 lines (38 loc) · 1.46 KB
/
Dockerfile.client
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
FROM alpine AS builder
RUN mkdir /usr/local/src && apk add binutils --no-cache\
build-base \
readline-dev \
openssl-dev \
ncurses-dev \
git \
cmake \
zlib-dev \
libsodium-dev \
gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
WORKDIR /usr/local/src
RUN git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
#RUN git clone -b ${GIT_TAG} https://github.com/SoftEtherVPN/SoftEtherVPN.git
ENV USE_MUSL=YES
RUN cd SoftEtherVPN &&\
git submodule init &&\
git submodule update &&\
./configure $TARGET_CONFIG_FLAGS &&\
make -C build
FROM alpine
RUN apk add --no-cache readline \
openssl \
libsodium \
gnu-libiconv \
iptables
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
ENV LD_LIBRARY_PATH /root
WORKDIR /usr/local/bin
VOLUME /mnt
RUN ln -s /mnt/vpn_client.config vpn_client.config && \
mkdir /mnt/backup.vpn_client.config &&\
ln -s /mnt/backup.vpn_client.config backup.vpn_client.config &&\
ln -s /mnt/lang.config lang.config
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnclient /usr/local/src/SoftEtherVPN/build/vpncmd /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so /usr/local/src/SoftEtherVPN/build/hamcore.se2 ./
COPY --from=builder /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so ../lib/
CMD ["/usr/local/bin/vpnclient", "execsvc"]