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.

40 lines
958 B

  1. #
  2. # Dockerfile for shadowsocks-libev
  3. #
  4. FROM alpine
  5. MAINTAINER kev <noreply@datageek.info>
  6. ENV SS_VER 2.4.4
  7. ENV SS_URL https://github.com/shadowsocks/shadowsocks-libev/archive/v$SS_VER.tar.gz
  8. ENV SS_DIR shadowsocks-libev-$SS_VER
  9. ENV SS_DEP autoconf build-base curl libtool linux-headers openssl-dev
  10. RUN set -ex \
  11. && apk add --update $SS_DEP \
  12. && curl -sSL $SS_URL | tar xz \
  13. && cd $SS_DIR \
  14. && ./configure \
  15. && make install \
  16. && cd .. \
  17. && rm -rf $SS_DIR \
  18. && apk del --purge $SS_DEP \
  19. && rm -rf /var/cache/apk/*
  20. ENV SERVER_ADDR 0.0.0.0
  21. ENV SERVER_PORT 8388
  22. ENV PASSWORD=
  23. ENV METHOD aes-256-cfb
  24. ENV TIMEOUT 300
  25. ENV DNS_ADDR 8.8.8.8
  26. EXPOSE $SERVER_PORT
  27. CMD ss-server -s $SERVER_ADDR \
  28. -p $SERVER_PORT \
  29. -k ${PASSWORD:-$(hostname)} \
  30. -m $METHOD \
  31. -t $TIMEOUT \
  32. --fast-open \
  33. -d $DNS_ADDR \
  34. -u