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.

33 lines
1.1 KiB

  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 \
  4. asciidoc xmlto zlib1g-dev libev-dev libudns-dev libsodium-dev \
  5. ca-certificates automake libmbedtls-dev
  6. ENV BASEDIR /tmp/shadowsocks-libev
  7. ENV SERVER_PORT 8338
  8. # Set up building environment
  9. RUN apt-get update \
  10. && apt-get install --no-install-recommends -y $DEPENDENCIES
  11. # Get the latest code, build and install
  12. RUN git clone https://github.com/shadowsocks/shadowsocks-libev.git $BASEDIR
  13. WORKDIR $BASEDIR
  14. RUN git submodule update --init --recursive \
  15. && ./autogen.sh \
  16. && ./configure \
  17. && make \
  18. && make install
  19. # Tear down building environment and delete git repository
  20. WORKDIR /
  21. RUN rm -rf $BASEDIR/shadowsocks-libev\
  22. && apt-get --purge autoremove -y $DEPENDENCIES
  23. # Port in the config file won't take affect. Instead we'll use 8388.
  24. EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp
  25. # Override the host and port in the config file.
  26. ADD entrypoint /
  27. ENTRYPOINT ["/entrypoint"]
  28. CMD ["-h"]