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.

43 lines
1.0 KiB

  1. #
  2. # Dockerfile for shadowsocks-libev
  3. #
  4. FROM alpine
  5. MAINTAINER kev <noreply@datageek.info>
  6. ENV SS_URL https://github.com/shadowsocks/shadowsocks-libev.git
  7. ENV SS_DIR shadowsocks-libev
  8. ENV SS_DEP pcre
  9. ENV SS_BUILD_DEP git autoconf build-base curl libtool linux-headers openssl-dev asciidoc xmlto pcre-dev
  10. RUN set -ex \
  11. && apk add --update $SS_DEP $SS_BUILD_DEP\
  12. && git clone $SS_URL \
  13. && cd $SS_DIR \
  14. && ./configure \
  15. && make install \
  16. && cd .. \
  17. && rm -rf $SS_DIR \
  18. && apk del --purge $SS_BUILD_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. ENV DNS_ADDR_2 8.8.4.4
  27. EXPOSE $SERVER_PORT
  28. EXPOSE $SERVER_PORT/udp
  29. CMD ss-server -s $SERVER_ADDR \
  30. -p $SERVER_PORT \
  31. -k ${PASSWORD:-$(hostname)} \
  32. -m $METHOD \
  33. -t $TIMEOUT \
  34. --fast-open \
  35. -d $DNS_ADDR \
  36. -d $DNS_ADDR_2 \
  37. -u