diff --git a/.docker/build b/.docker/build index dc2a016..e2f9d94 100644 --- a/.docker/build +++ b/.docker/build @@ -2,11 +2,23 @@ build_ss_libev(){ SS_DIR = $BUILD_DIR/shadowsocks-libev - apk add build-deps git autoconf automake libtool build-base libev-dev linux-headers libsodium-dev mbedtls-dev pcre-dev c-ares-dev - git clone https://github.com/shadowsocks/shadowsocks-libev.git $SS_DIR - cd $SS_DIR - ./autogen.sh && ./configure - make && make install + set -ex && \ + apk add --no-cache --virtual .build-deps git autoconf automake libtool build-base libev-dev linux-headers libsodium-dev mbedtls-dev pcre-dev c-ares-dev + git clone https://github.com/shadowsocks/shadowsocks-libev $SS_DIR + cd $SS_DIR + ./autogen.sh + ./configure --prefix=/usr --disable-documentation + make install + + 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 rng-tools $runDeps + apk del .build-deps + rm -rf $SS_DIR/* } build_obfs(){