Skip to content

Instantly share code, notes, and snippets.

@nickfox-taterli
Created June 20, 2020 11:01
Show Gist options
  • Save nickfox-taterli/fe7a9c418951ac6a23a630a09cf2bb60 to your computer and use it in GitHub Desktop.
Save nickfox-taterli/fe7a9c418951ac6a23a630a09cf2bb60 to your computer and use it in GitHub Desktop.
shadowsocks-libev Dockerfile
FROM alpine
MAINTAINER TaterLi <[email protected]>
RUN set -ex && \
apk add --no-cache udns && \
apk add --no-cache --virtual .build-deps \
git autoconf automake make build-base \
curl libev-dev c-ares-dev libtool linux-headers \
libsodium-dev mbedtls-dev pcre-dev tar udns-dev && \
cd /tmp/ && \
git clone https://github.com/shadowsocks/shadowsocks-libev.git && \
cd shadowsocks-libev && \
git submodule update --init --recursive && \
./autogen.sh && \
./configure --prefix=/usr --disable-documentation && \
make install && \
cd /tmp/ && \
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 $runDeps && \
apk del .build-deps && \
rm -rf /tmp/*
ENV PASSWORD=NQj4JUbLMT
EXPOSE 1080/tcp
EXPOSE 1080/udp
CMD ss-server -u -s 0.0.0.0 -p 1080 -k "$PASSWORD" -m "aes-256-gcm" -t 300 -d "8.8.8.8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment