mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-19 12:03:43 +00:00
- based on ubuntu image - builds shadowsocks-libev from latest code - more information can be found in README.md
32 lines
796 B
Docker
32 lines
796 B
Docker
FROM ubuntu:latest
|
|
|
|
MAINTAINER Sah Lee <contact@leesah.name>
|
|
|
|
ENV DEPENDENCIES git-core build-essential autoconf libtool libssl-dev
|
|
ENV BASEDIR /tmp/shadowsocks-libev
|
|
ENV PORT 8338
|
|
|
|
# Set up building environment
|
|
RUN apt-get update \
|
|
&& apt-get install -y $DEPENDENCIES
|
|
|
|
# Get the latest code, build and install
|
|
RUN git clone https://github.com/shadowsocks/shadowsocks-libev.git $BASEDIR
|
|
WORKDIR $BASEDIR
|
|
RUN ./configure \
|
|
&& make \
|
|
&& make install
|
|
|
|
# Tear down building environment and delete git repository
|
|
WORKDIR /
|
|
RUN rm -rf $BASEDIR/shadowsocks-libev\
|
|
&& apt-get --purge autoremove -y $DEPENDENCIES
|
|
|
|
# Port in the config file won't take affect. Instead we'll use 8388.
|
|
EXPOSE $PORT
|
|
|
|
# Override the host and port in the config file.
|
|
ADD entrypoint /
|
|
ENTRYPOINT ["/entrypoint"]
|
|
CMD ["-h"]
|