2015-06-16 02:42:06 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for shadowsocks-libev
|
|
|
|
#
|
|
|
|
|
2015-06-16 09:56:05 +02:00
|
|
|
FROM alpine
|
2015-06-16 02:42:06 +02:00
|
|
|
MAINTAINER kev <noreply@datageek.info>
|
|
|
|
|
2015-07-19 08:12:19 +02:00
|
|
|
ENV SS_VER 2.2.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-07-16 11:23:25 +02:00
|
|
|
ENV SS_DEP autoconf build-base curl libtool linux-headers openssl-dev
|
2015-06-16 09:56:05 +02:00
|
|
|
|
2015-06-16 10:25:37 +02:00
|
|
|
RUN apk add --update $SS_DEP \
|
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 \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& ./configure \
|
|
|
|
&& make install \
|
2015-07-16 11:25:40 +02:00
|
|
|
&& cd .. \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& rm -rf $SS_DIR \
|
2015-06-16 10:25:37 +02:00
|
|
|
&& apk del --purge $SS_DEP \
|
2015-06-16 09:56:05 +02:00
|
|
|
&& rm -rf /var/cache/apk/*
|
2015-06-16 02:42:06 +02:00
|
|
|
|
|
|
|
ENV SERVER_ADDR 0.0.0.0
|
|
|
|
ENV SERVER_PORT 8388
|
2015-06-19 20:25:40 +02:00
|
|
|
ENV PASSWORD=
|
2015-06-16 02:42:06 +02:00
|
|
|
ENV METHOD aes-256-cfb
|
|
|
|
ENV TIMEOUT 300
|
|
|
|
ENV DNS_ADDR 8.8.8.8
|
|
|
|
|
2015-06-16 03:11:54 +02:00
|
|
|
EXPOSE $SERVER_PORT
|
2015-06-16 02:42:06 +02:00
|
|
|
|
|
|
|
CMD ss-server -s $SERVER_ADDR \
|
|
|
|
-p $SERVER_PORT \
|
2015-06-19 20:44:31 +02:00
|
|
|
-k ${PASSWORD:-$(hostname)} \
|
2015-06-16 02:42:06 +02:00
|
|
|
-m $METHOD \
|
|
|
|
-t $TIMEOUT \
|
|
|
|
--fast-open \
|
|
|
|
-d $DNS_ADDR \
|
|
|
|
-u
|