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