2015-02-09 22:40:25 +08:00
|
|
|
#
|
2015-05-27 16:52:12 +08:00
|
|
|
# Dockerfile for shadowsocks
|
2015-02-09 22:40:25 +08:00
|
|
|
#
|
|
|
|
|
2015-06-16 15:07:59 +08:00
|
|
|
FROM alpine
|
2015-05-27 16:52:12 +08:00
|
|
|
MAINTAINER kev <noreply@datageek.info>
|
2015-02-09 22:40:25 +08:00
|
|
|
|
2015-06-16 16:25:37 +08:00
|
|
|
RUN apk add --update curl python \
|
2015-05-27 16:52:12 +08:00
|
|
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
|
|
|
&& pip install shadowsocks \
|
2015-06-16 16:25:37 +08:00
|
|
|
&& apk del --purge curl \
|
2015-06-16 15:07:59 +08:00
|
|
|
&& rm -rf /var/cache/apk/*
|
2015-02-09 22:40:25 +08:00
|
|
|
|
2015-05-27 16:52:12 +08:00
|
|
|
ENV SERVER_ADDR 0.0.0.0
|
|
|
|
ENV SERVER_PORT 8388
|
2015-06-20 02:25:40 +08:00
|
|
|
ENV PASSWORD=
|
2015-06-16 08:42:06 +08:00
|
|
|
ENV METHOD aes-256-cfb
|
|
|
|
ENV TIMEOUT 300
|
|
|
|
ENV WORKERS 10
|
|
|
|
|
2015-06-16 09:11:54 +08:00
|
|
|
EXPOSE $SERVER_PORT
|
2015-02-09 22:40:25 +08:00
|
|
|
|
2015-05-27 16:52:12 +08:00
|
|
|
CMD ssserver -s $SERVER_ADDR \
|
|
|
|
-p $SERVER_PORT \
|
2015-06-20 02:44:31 +08:00
|
|
|
-k ${PASSWORD:-$(hostname)} \
|
2015-05-27 16:52:12 +08:00
|
|
|
-m $METHOD \
|
|
|
|
-t $TIMEOUT \
|
|
|
|
--fast-open \
|
|
|
|
--workers $WORKERS
|
|
|
|
|