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.

32 lines
849 B

  1. FROM ubuntu:latest
  2. MAINTAINER Sah Lee <contact@leesah.name>
  3. ENV DEPENDENCIES git-core build-essential autoconf libtool libssl-dev asciidoc xmlto
  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 -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 ./configure \
  13. && make \
  14. && make install
  15. # Tear down building environment and delete git repository
  16. WORKDIR /
  17. RUN rm -rf $BASEDIR/shadowsocks-libev\
  18. && apt-get --purge autoremove -y $DEPENDENCIES
  19. # Port in the config file won't take affect. Instead we'll use 8388.
  20. EXPOSE $SERVER_PORT
  21. EXPOSE $SERVER_PORT/udp
  22. # Override the host and port in the config file.
  23. ADD entrypoint /
  24. ENTRYPOINT ["/entrypoint"]
  25. CMD ["-h"]