2015-06-16 02:42:06 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for shadowsocks-libev
|
|
|
|
#
|
|
|
|
|
2017-02-02 05:28:00 +02:00
|
|
|
FROM alpine:3.5
|
|
|
|
MAINTAINER EasyPi Software Foundation
|
2015-06-16 02:42:06 +02:00
|
|
|
|
2017-02-02 05:28:00 +02:00
|
|
|
ENV SS_VER 2.6.3
|
2015-06-16 09:56:05 +02:00
|
|
|
ENV SS_URL https://github.com/shadowsocks/shadowsocks-libev/archive/v$SS_VER.tar.gz
|
|
|
|
ENV SS_DIR shadowsocks-libev-$SS_VER
|
|
|
|
|
2015-12-24 16:09:35 +02:00
|
|
|
RUN set -ex \
|
2017-02-02 05:28:00 +02:00
|
|
|
&& apk add --no-cache libcrypto1.0 \
|
|
|
|
libev \
|
|
|
|
libsodium \
|
|
|
|
pcre \
|
|
|
|
udns \
|
|
|
|
&& apk add --no-cache \
|
|
|
|
--virtual TMP autoconf \
|
|
|
|
automake \
|
|
|
|
build-base \
|
|
|
|
curl \
|
|
|
|
gettext-dev \
|
|
|
|
libev-dev \
|
|
|
|
libsodium-dev \
|
|
|
|
libtool \
|
|
|
|
linux-headers \
|
|
|
|
openssl-dev \
|
|
|
|
pcre-dev \
|
|
|
|
tar \
|
|
|
|
udns-dev \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& curl -sSL $SS_URL | tar xz \
|
2015-07-16 11:25:40 +02:00
|
|
|
&& cd $SS_DIR \
|
2017-02-02 05:28:00 +02:00
|
|
|
&& 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 \
|
|
|
|
&& ./autogen.sh \
|
|
|
|
&& ./configure --disable-documentation \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& make install \
|
2015-07-16 11:25:40 +02:00
|
|
|
&& cd .. \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& rm -rf $SS_DIR \
|
2017-02-02 05:28:00 +02:00
|
|
|
&& apk del TMP
|
2015-06-16 02:42:06 +02:00
|
|
|
|
|
|
|
ENV SERVER_ADDR 0.0.0.0
|
|
|
|
ENV SERVER_PORT 8388
|
|
|
|
ENV METHOD aes-256-cfb
|
2017-02-02 05:28:00 +02:00
|
|
|
ENV PASSWORD=
|
|
|
|
ENV TIMEOUT 60
|
2015-06-16 02:42:06 +02:00
|
|
|
ENV DNS_ADDR 8.8.8.8
|
|
|
|
|
2016-03-25 13:52:16 +02:00
|
|
|
EXPOSE $SERVER_PORT/tcp
|
|
|
|
EXPOSE $SERVER_PORT/udp
|
2015-06-16 02:42:06 +02:00
|
|
|
|
2017-02-02 05:28:00 +02:00
|
|
|
CMD ss-server -s "$SERVER_ADDR" \
|
|
|
|
-p "$SERVER_PORT" \
|
|
|
|
-m "$METHOD" \
|
|
|
|
-k "$PASSWORD" \
|
|
|
|
-t "$TIMEOUT" \
|
|
|
|
-d "$DNS_ADDR" \
|
|
|
|
-u \
|
|
|
|
--fast-open $OPTIONS
|