-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
53 lines (47 loc) · 1.53 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
FROM alpine:3.6
LABEL maintainer="liukangxu <liukangxu1996@gmail.com>"
ARG TZ='Asia/Shanghai'
ENV TZ $TZ
ENV SS_LIBEV_VERSION 3.0.8
RUN apk upgrade --update \
&& apk add bash tzdata libsodium nodejs \
&& apk add --virtual .build-deps \
autoconf \
automake \
asciidoc \
xmlto \
build-base \
curl \
libev-dev \
libtool \
linux-headers \
udns-dev \
libsodium-dev \
mbedtls-dev \
pcre-dev \
udns-dev \
tar \
git \
nodejs-npm \
&& npm i -g shadowsocks-manager \
&& curl -sSLO https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$SS_LIBEV_VERSION/shadowsocks-libev-$SS_LIBEV_VERSION.tar.gz \
&& tar -zxf shadowsocks-libev-$SS_LIBEV_VERSION.tar.gz \
&& (cd shadowsocks-libev-$SS_LIBEV_VERSION \
&& ./configure --prefix=/usr --disable-documentation \
&& make install ) \
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& runDeps="$( \
scanelf --needed --nobanner /usr/bin/ss-* /usr/bin/ssmgr \
| 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 \
shadowsocks-libev-$SS_LIBEV_VERSION.tar.gz \
shadowsocks-libev-$SS_LIBEV_VERSION \
/var/cache/apk/*
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]