This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
executable file
·68 lines (61 loc) · 1.99 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
FROM alpine:latest
MAINTAINER mrjin<me@jinfeijie.cn>
WORKDIR /
ENV MIRRORS mirrors.ustc.edu.cn
ENV SS_VER 3.3.1
ENV SS_URL https://github.com/shadowsocks/shadowsocks-libev.git
ENV SERVER_ADDR 0.0.0.0
ENV SERVER_PORT 8888
ENV PASSWORD jin123
ENV METHOD aes-256-cfb
ENV TIMEOUT 300
ENV DNS_ADDR 8.8.8.8
ENV DNS_ADDR_2 8.8.4.4
ENV TUN_PORT 443
ENV TUN_CRYPT aes-128
ENV TUN_MODE fast
ENV TUN_MTU 1350
ENV TUN_DATASHARD 10
ENV TUN_PS 3
COPY bin/* /usr/bin/
RUN set -ex && \
apk update && \
apk add --no-cache --virtual .build-deps \
asciidoc \
autoconf \
automake \
build-base \
libtool \
linux-headers \
c-ares-dev \
libev-dev \
libsodium-dev \
openssl \
openssl-dev \
mbedtls-dev \
pcre-dev \
zlib-dev \
tar \
xmlto \
haveged \
git && \
cd /tmp && \
git clone $SS_URL shadowsocks && \
cd shadowsocks && \
git checkout v$SS_VER && \
git submodule init && git submodule update && \
autoreconf --install --force && \
./configure --prefix=/usr --disable-documentation && \
make install && \
cd .. && \
runDeps="$( \
scanelf --needed --nobanner /usr/bin/ss-* \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| xargs -r apk info --installed \
| sort -u \
)" && \
apk add --no-cache --virtual .run-deps $runDeps && \
apk del .build-deps && \
rm -rf /tmp/*
EXPOSE $TUN_PORT/udp
CMD ["/usr/bin/start"]