Merge debfeb177c
into e332ec93e9
This commit is contained in:
commit
97fe7f2ef1
1 changed files with 15 additions and 13 deletions
28
Dockerfile
28
Dockerfile
|
@ -1,17 +1,19 @@
|
|||
FROM ubuntu:14.04
|
||||
FROM alpine:3.4
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python-software-properties \
|
||||
software-properties-common \
|
||||
&& add-apt-repository ppa:chris-lea/libsodium \
|
||||
&& echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list \
|
||||
&& echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y libsodium-dev python-pip
|
||||
RUN if [ $(wget -qO- ipinfo.io/country) == CN ]; then echo "http://mirrors.ustc.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories ;fi \
|
||||
&& apk update && apk upgrade \
|
||||
&& apk add python py-pip libsodium
|
||||
|
||||
RUN pip install shadowsocks
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/ssserver"]
|
||||
COPY . /shadowsocks
|
||||
WORKDIR /shadowsocks
|
||||
RUN python setup.py install
|
||||
|
||||
ENTRYPOINT ["/usr/bin/ssserver"]
|
||||
# usage:
|
||||
# docker run -d --restart=always -p 1314:1314 ficapy/shadowsocks -s 0.0.0.0 -p 1314 -k $PD -m chacha20
|
||||
# docker build -t shadowsocks .
|
||||
# server:
|
||||
# docker run -d --restart=always -p 1314:1314 -v /etc/shadowsocks.json:/config shadowsocks -s 0.0.0.0 -c /config
|
||||
# or docker run -d --restart=always -p 1314
|
||||
# client:
|
||||
# docker run -d --entrypoint=/usr/bin/sslocal --restart=always -p 1080:1080 -v /etc/shadowsocks.json:/config shadowsocks -c /config
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue