forked from teddysun/shadowsocks_install
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added shadowsocks-libev docker image based alpine
Signed-off-by: Teddysun <[email protected]>
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Dockerfile for shadowsocks-libev based alpine | ||
# Copyright (C) 2018 Teddysun <[email protected]> | ||
# Reference URL: | ||
# https://github.com/shadowsocks/shadowsocks-libev | ||
|
||
FROM alpine:latest | ||
LABEL maintainer="Teddysun <[email protected]>" | ||
|
||
ENV LIBEV_VER 3.2.0 | ||
ENV LIBEV_NAME shadowsocks-libev-${LIBEV_VER} | ||
ENV LIBEV_RELEASE https://github.com/shadowsocks/shadowsocks-libev/releases/download/v${LIBEV_VER}/${LIBEV_NAME}.tar.gz | ||
|
||
RUN set -ex \ | ||
&& runDeps=' \ | ||
tar \ | ||
git \ | ||
wget \ | ||
build-base \ | ||
c-ares-dev \ | ||
autoconf \ | ||
automake \ | ||
libev-dev \ | ||
libtool \ | ||
libsodium-dev \ | ||
linux-headers \ | ||
mbedtls-dev \ | ||
pcre-dev \ | ||
' \ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
${runDeps} \ | ||
&& mkdir -p /tmp/libev \ | ||
&& cd /tmp/libev \ | ||
&& git clone --depth=1 https://github.com/shadowsocks/simple-obfs.git . \ | ||
&& git submodule update --init --recursive \ | ||
&& ./autogen.sh \ | ||
&& ./configure --prefix=/usr --disable-documentation \ | ||
&& make install \ | ||
&& rm -rf * \ | ||
&& wget -qO ${LIBEV_NAME}.tar.gz ${LIBEV_RELEASE} \ | ||
&& tar zxf ${LIBEV_NAME}.tar.gz \ | ||
&& cd ${LIBEV_NAME} \ | ||
&& ./configure --prefix=/usr --disable-documentation \ | ||
&& make install \ | ||
&& apk add --no-cache \ | ||
rng-tools \ | ||
$(scanelf --needed --nobanner /usr/bin/ss-* \ | ||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ | ||
| xargs -r apk info --installed \ | ||
| sort -u) \ | ||
&& apk del .build-deps \ | ||
&& cd /tmp \ | ||
&& rm -rf /tmp/libev \ | ||
|
||
COPY ./config_sample.json /etc/shadowsocks-libev/config.json | ||
VOLUME /etc/shadowsocks-libev | ||
|
||
USER nobody | ||
|
||
CMD [ "ss-server", "-c", "/etc/shadowsocks-libev/config.json" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"server":"0.0.0.0", | ||
"server_port":9000, | ||
"password":"password0", | ||
"timeout":300, | ||
"method":"aes-256-gcm", | ||
"fast_open":true, | ||
"nameserver":"8.8.8.8", | ||
"mode":"tcp_and_udp" | ||
} |