diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..678587f8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +# General +.dockerignore +.gitignore +.github +AUTHORS +Changes +COPYING +INSTALL +LICENSE +README.md + +# Code formatting +.uncrustify.cfg +code-format.bat +code-format.sh + +# CI & CD +.travis.yml +tests + +# OS-specific packaging, etc. +debian +scripts/build_deb.sh +rpm +completions diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index f2010a18..91abbdc3 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -5,9 +5,6 @@ FROM alpine MAINTAINER kev -ARG SS_VER=3.1.3 -ARG SS_URL=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$SS_VER/shadowsocks-libev-$SS_VER.tar.gz - ENV SERVER_ADDR 0.0.0.0 ENV SERVER_PORT 8388 ENV PASSWORD= @@ -17,23 +14,26 @@ ENV DNS_ADDR 8.8.8.8 ENV DNS_ADDR_2 8.8.4.4 ENV ARGS= +COPY . /tmp + RUN set -ex && \ apk add --no-cache --virtual .build-deps \ + git \ autoconf \ + automake \ + libtool \ build-base \ - curl \ libev-dev \ linux-headers \ libsodium-dev \ mbedtls-dev \ pcre-dev \ - tar \ c-ares-dev && \ cd /tmp && \ - curl -sSL $SS_URL | tar xz --strip 1 && \ + git submodule update --init --recursive && \ + ./autogen.sh && \ ./configure --prefix=/usr --disable-documentation && \ make install && \ - cd .. && \ runDeps="$( \ scanelf --needed --nobanner /usr/bin/ss-* \