Update Dockerfile

Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
Teddysun 2018-08-11 20:48:47 +09:00
parent c00c849326
commit 9b7e26c95e
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D
3 changed files with 50 additions and 52 deletions

View File

@ -10,8 +10,7 @@ ENV LIBEV_VER 3.2.0
ENV LIBEV_NAME shadowsocks-libev-${LIBEV_VER}
ENV LIBEV_RELEASE https://github.com/shadowsocks/shadowsocks-libev/releases/download/v${LIBEV_VER}/${LIBEV_NAME}.tar.gz
RUN set -ex \
&& runDeps=' \
RUN runDeps="\
tar \
git \
wget \
@ -25,9 +24,9 @@ RUN set -ex \
linux-headers \
mbedtls-dev \
pcre-dev \
' \
&& apk add --no-cache --virtual .build-deps \
${runDeps} \
"; \
set -ex \
&& apk add --no-cache --virtual .build-deps ${runDeps} \
&& mkdir -p /tmp/libev \
&& cd /tmp/libev \
&& git clone --depth=1 https://github.com/shadowsocks/simple-obfs.git . \
@ -41,15 +40,14 @@ RUN set -ex \
&& cd ${LIBEV_NAME} \
&& ./configure --prefix=/usr --disable-documentation \
&& make install \
&& apk add --no-cache \
rng-tools \
&& apk add --no-cache rng-tools \
$(scanelf --needed --nobanner /usr/bin/ss-* \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| xargs -r apk info --installed \
| sort -u) \
&& apk del .build-deps \
&& cd /tmp \
&& rm -rf /tmp/libev \
&& rm -rf /tmp/libev
COPY ./config_sample.json /etc/shadowsocks-libev/config.json
VOLUME /etc/shadowsocks-libev