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
|
2017-05-08 01:05:07 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2015-02-09 16:40:25 +02:00
|
|
|
|
2015-12-24 16:09:35 +02:00
|
|
|
RUN set -ex \
|
|
|
|
&& echo 'http://nl.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories \
|
2015-09-16 10:08:42 +02:00
|
|
|
&& apk add -U curl libsodium python \
|
2015-05-27 10:52:12 +02:00
|
|
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
|
|
|
&& pip install shadowsocks \
|
2015-09-16 10:08:42 +02:00
|
|
|
&& apk del curl \
|
2015-06-16 09:07:59 +02:00
|
|
|
&& 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 METHOD aes-256-cfb
|
2015-09-16 10:08:42 +02:00
|
|
|
ENV PASSWORD=
|
2015-06-16 02:42:06 +02:00
|
|
|
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-09-16 10:08:42 +02:00
|
|
|
CMD ssserver -s "$SERVER_ADDR" \
|
|
|
|
-p "$SERVER_PORT" \
|
|
|
|
-k "${PASSWORD:-$(hostname)}" \
|
|
|
|
-m "$METHOD" \
|
|
|
|
-t "$TIMEOUT" \
|
|
|
|
--workers "$WORKERS" \
|
|
|
|
--fast-open
|
2015-05-27 10:52:12 +02:00
|
|
|
|