From 5ff4f27b74be9f390e639b960a6ec8baafc1e850 Mon Sep 17 00:00:00 2001 From: Asynchronous Interruption #0 Date: Sat, 28 Jan 2017 14:34:34 +0800 Subject: [PATCH] Update Dockerfile (#1146) * Update README * Update Dockerfile --- README.md | 2 +- docker/alpine/Dockerfile | 1 + docker/ubuntu/Dockerfile | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 68fe4faa..32c20c27 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ e.g. Ubuntu, Debian or Linux Mint, you can build the binary like this: ```bash # Debian / Ubuntu -sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto zlib1g-dev +sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto zlib1g-dev libev-dev libudns-dev libsodium-dev # CentOS / Fedora / RHEL sudo yum install gettext gcc autoconf libtool automake make zlib-devel openssl-devel asciidoc xmlto udns-devel libev-devel # Arch diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index 35975957..8a3bacf3 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -36,6 +36,7 @@ RUN set -ex && \ xmlto && \ cd /tmp && \ curl -sSL $SS_URL | tar xz --strip 1 && \ + ./autogen.sh && \ ./configure --prefix=/usr --disable-documentation && \ make install && \ cd .. && \ diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index 12aa2840..7dd28637 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -1,19 +1,20 @@ FROM ubuntu:latest - MAINTAINER Sah Lee -ENV DEPENDENCIES git-core build-essential autoconf libtool libssl-dev asciidoc xmlto +ENV DEPENDENCIES git-core gettext build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto zlib1g-dev libev-dev libudns-dev libsodium-dev ENV BASEDIR /tmp/shadowsocks-libev ENV SERVER_PORT 8338 # Set up building environment RUN apt-get update \ - && apt-get install -y $DEPENDENCIES + && apt-get install --no-install-recommends -y $DEPENDENCIES # Get the latest code, build and install RUN git clone https://github.com/shadowsocks/shadowsocks-libev.git $BASEDIR WORKDIR $BASEDIR -RUN ./configure \ +RUN git submodule update --init --recursive \ + && ./autogen.sh \ + && ./configure \ && make \ && make install @@ -23,10 +24,9 @@ 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 $SERVER_PORT -EXPOSE $SERVER_PORT/udp +EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp # Override the host and port in the config file. ADD entrypoint / ENTRYPOINT ["/entrypoint"] -CMD ["-h"] +CMD ["-h"] \ No newline at end of file