Signed-off-by: shirakun <nico@ni-co.moe>
This commit is contained in:
parent
7e64118699
commit
32b3a3bf9d
81
Dockerfile
81
Dockerfile
|
|
@ -1,7 +1,80 @@
|
|||
FROM smartentry/alpine:3.6-0.4.0
|
||||
#
|
||||
# Dockerfile for shadowsocks-libev
|
||||
#
|
||||
|
||||
MAINTAINER Kagurazaka Shira <nico@ni-co.moe>
|
||||
FROM alpine
|
||||
LABEL maintainer="Kaugrazaka Shira <nico@ni-co.moe>"
|
||||
|
||||
ADD .docker $ASSETS_DIR
|
||||
ENV BIND_ADDR 0.0.0.0
|
||||
ENV BIND_PORT 8981
|
||||
ENV PASSWORD 123456
|
||||
ENV METHOD aes-256-cfb
|
||||
ENV TIMEOUT 300
|
||||
ENV DNS_1 8.8.8.8
|
||||
ENV DNS_2 8.8.4.4
|
||||
ENV ARGS=
|
||||
ENV OBFS tls
|
||||
|
||||
RUN smartentry.sh build
|
||||
ENV SS_DIR /tmp/shadowsocks-libev
|
||||
ENV OBFS_DIR /tmp/simple-obfs
|
||||
|
||||
RUN set -ex && \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
git \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
build-base \
|
||||
libev-dev \
|
||||
linux-headers \
|
||||
libsodium-dev \
|
||||
mbedtls-dev \
|
||||
pcre-dev \
|
||||
c-ares-dev \
|
||||
gcc \
|
||||
make \
|
||||
zlib-devel \
|
||||
openssl \
|
||||
asciidoc \
|
||||
xmlto \
|
||||
libpcre32 \
|
||||
g++ && \
|
||||
git clone https://github.com/shadowsocks/shadowsocks-libev $SS_DIR && \
|
||||
cd $SS_DIR && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr --disable-documentation && \
|
||||
make install && \
|
||||
|
||||
runDeps="$( \
|
||||
scanelf --needed --nobanner /usr/bin/ss-* \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" && \
|
||||
apk add --no-cache --virtual .run-deps \
|
||||
rng-tools \
|
||||
$runDeps && \
|
||||
git clone https://github.com/shadowsocks/simple-obfs $OBFS_DIR && \
|
||||
cd $OBFS_DIR && \
|
||||
git submodule update --init --recursive && \
|
||||
./autogen.sh && \
|
||||
./configure && make && \
|
||||
make install && \
|
||||
apk del .build-deps && \
|
||||
rm -rf $SS_DIR/* $OBFS_DIR/*
|
||||
|
||||
USER nobody
|
||||
|
||||
EXPOSE 8388/tcp 8388/udp
|
||||
|
||||
CMD ss-server -s $BIND_ADDR \
|
||||
-p $BIND_PORT \
|
||||
-k $PASSWORD \
|
||||
-m $METHOD \
|
||||
-t $TIMEOUT \
|
||||
-d $DNS_1 \
|
||||
-d $DNS_2 \
|
||||
-u \
|
||||
--plugin obfs-server \
|
||||
--plugin-opts "obfs=$OBFS" \
|
||||
$ARGS
|
||||
Loading…
Reference in New Issue
Block a user