-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
63 lines (57 loc) · 2.06 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
#
# Dockerfile for shadowsocks-libev
#
FROM alpine:3.19
MAINTAINER EasyPi Software Foundation
ARG SS_VERSION=3.3.5
ARG SS_URL=https://github.com/shadowsocks/shadowsocks-libev/archive/v${SS_VERSION}.tar.gz
ARG SS_DIR=shadowsocks-libev-${SS_VERSION}
RUN set -ex \
&& apk add --no-cache c-ares \
libcrypto3 \
libev \
libsodium \
mbedtls \
pcre \
&& apk add --no-cache \
--virtual TMP autoconf \
automake \
build-base \
c-ares-dev \
curl \
gettext-dev \
libev-dev \
libsodium-dev \
libtool \
linux-headers \
mbedtls-dev \
openssl-dev \
pcre-dev \
tar \
&& curl -sSL $SS_URL | tar xz \
&& cd $SS_DIR \
&& curl -sSL https://github.com/shadowsocks/ipset/archive/shadowsocks.tar.gz | tar xz --strip 1 -C libipset \
&& curl -sSL https://github.com/shadowsocks/libcork/archive/shadowsocks.tar.gz | tar xz --strip 1 -C libcork \
&& curl -sSL https://github.com/shadowsocks/libbloom/archive/master.tar.gz | tar xz --strip 1 -C libbloom \
&& ./autogen.sh \
&& ./configure --disable-documentation \
&& make install \
&& cd .. \
&& rm -rf $SS_DIR \
&& apk del TMP
ENV SERVER_ADDR=0.0.0.0
ENV SERVER_PORT=8388
ENV METHOD=chacha20-ietf-poly1305
ENV PASSWORD=
ENV TIMEOUT=60
ENV DNS_ADDR=8.8.8.8
EXPOSE $SERVER_PORT/tcp
EXPOSE $SERVER_PORT/udp
CMD ss-server -s "$SERVER_ADDR" \
-p "$SERVER_PORT" \
-m "$METHOD" \
-k "$PASSWORD" \
-t "$TIMEOUT" \
-d "$DNS_ADDR" \
-u \
--fast-open $OPTIONS