Files
shadowsocks-libev/docker/alpine/Dockerfile
T
Sah ea571c3f41 Update Dockerfile to utilize Docker Cloud auto build
* Use the repository as context, instead of released .tar.gz
* Remove version information from Dockerfile, and let Docker Cloud handle it
* Add .dockerignore

Next steps:

1. Connect repository in Docker Cloud
2. Setup automated builds:
   - A push on `master` branch triggers build for `unstable` tag
   - A tag matching /^v[0-9]+(\.[0-9]+){2}$/ triggers build for a same-named tag

Refer to #1914
2018-02-08 18:31:18 +01:00

62 lines
1.6 KiB
Docker

#
# Dockerfile for shadowsocks-libev
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
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
ENV ARGS=
COPY . /tmp
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 && \
cd /tmp && \
git submodule update --init --recursive && \
./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 $runDeps && \
apk del .build-deps && \
rm -rf /tmp/*
USER nobody
EXPOSE $SERVER_PORT/tcp $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 \
$ARGS