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.

31 lines
1001 B

  1. FROM ubuntu:latest
  2. MAINTAINER Sah Lee <contact@leesah.name>
  3. ENV DEPENDENCIES git-core gettext build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto zlib1g-dev libev-dev libudns-dev libsodium-dev
  4. ENV BASEDIR /tmp/shadowsocks-libev
  5. ENV SERVER_PORT 8338
  6. # Set up building environment
  7. RUN apt-get update \
  8. && apt-get install --no-install-recommends -y $DEPENDENCIES
  9. # Get the latest code, build and install
  10. RUN git clone https://github.com/shadowsocks/shadowsocks-libev.git $BASEDIR
  11. WORKDIR $BASEDIR
  12. RUN git submodule update --init --recursive \
  13. && ./autogen.sh \
  14. && ./configure \
  15. && make \
  16. && make install
  17. # Tear down building environment and delete git repository
  18. WORKDIR /
  19. RUN rm -rf $BASEDIR/shadowsocks-libev\
  20. && apt-get --purge autoremove -y $DEPENDENCIES
  21. # Port in the config file won't take affect. Instead we'll use 8388.
  22. EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp
  23. # Override the host and port in the config file.
  24. ADD entrypoint /
  25. ENTRYPOINT ["/entrypoint"]
  26. CMD ["-h"]