dockerfile use alpine
This commit is contained in:
parent
f35590b2e2
commit
debfeb177c
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 \
|
RUN if [ $(wget -qO- ipinfo.io/country) == CN ]; then echo "http://mirrors.ustc.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories ;fi \
|
||||||
python-software-properties \
|
&& apk update && apk upgrade \
|
||||||
software-properties-common \
|
&& apk add python py-pip libsodium
|
||||||
&& 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 pip install shadowsocks
|
COPY . /shadowsocks
|
||||||
|
WORKDIR /shadowsocks
|
||||||
ENTRYPOINT ["/usr/local/bin/ssserver"]
|
RUN python setup.py install
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/ssserver"]
|
||||||
# usage:
|
# 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