You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1002 B
42 lines
1002 B
#
|
|
# Dockerfile for shadowsocks-libev
|
|
#
|
|
|
|
FROM alpine
|
|
MAINTAINER kev <noreply@datageek.info>
|
|
|
|
ENV SS_URL https://github.com/shadowsocks/shadowsocks-libev.git
|
|
ENV SS_DIR shadowsocks-libev
|
|
ENV SS_DEP git autoconf build-base curl libtool linux-headers openssl-dev asciidoc xmlto
|
|
|
|
RUN set -ex \
|
|
&& apk add --update $SS_DEP \
|
|
&& git clone $SS_URL \
|
|
&& cd $SS_DIR \
|
|
&& ./configure \
|
|
&& make install \
|
|
&& cd .. \
|
|
&& rm -rf $SS_DIR \
|
|
&& apk del --purge $SS_DEP \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
ENV SERVER_ADDR 0.0.0.0
|
|
ENV SERVER_PORT 8388
|
|
ENV PASSWORD=
|
|
ENV METHOD aes-256-cfb
|
|
ENV TIMEOUT 300
|
|
ENV DNS_ADDR 8.8.8.8
|
|
ENV DNS_ADDR_2 8.8.4.4
|
|
|
|
EXPOSE $SERVER_PORT
|
|
EXPOSE $SERVER_PORT/udp
|
|
|
|
CMD ss-server -s $SERVER_ADDR \
|
|
-p $SERVER_PORT \
|
|
-k ${PASSWORD:-$(hostname)} \
|
|
-m $METHOD \
|
|
-t $TIMEOUT \
|
|
--fast-open \
|
|
-d $DNS_ADDR \
|
|
-d $DNS_ADDR_2 \
|
|
-u
|