1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-22 05:09:09 +02:00

33 lines
825 B
Docker
Raw Normal View History

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