Update Dockerfile
This commit is contained in:
parent
c48574669f
commit
92cdf0fba1
1 changed files with 19 additions and 8 deletions
|
@ -1,17 +1,28 @@
|
|||
FROM ubuntu:latest
|
||||
|
||||
MAINTAINER Sah Lee <contact@leesah.name>
|
||||
|
||||
ENV PORT 8388
|
||||
EXPOSE $PORT
|
||||
|
||||
ENV CONF /etc/shadowsocks.json
|
||||
VOLUME ["/etc/shadowsocks.json"]
|
||||
|
||||
CMD ssserver -p $PORT -c $CONF
|
||||
|
||||
# Set up building environment
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y git-core python python-setuptools
|
||||
|
||||
# Get the latest code, build and install
|
||||
RUN git clone https://github.com/shadowsocks/shadowsocks.git
|
||||
RUN cd shadowsocks
|
||||
RUN python setup.py build
|
||||
RUN python setup.py install
|
||||
|
||||
# Tear down building environment and delete git repository
|
||||
RUN apt-get --purge autoremove -y git-core python python-setuptools
|
||||
RUN cd ..
|
||||
RUN rm -rf shadowsocks
|
||||
|
||||
# Config file can be in a separated container
|
||||
ENV CONF /etc/shadowsocks.json
|
||||
VOLUME ["$CONF"]
|
||||
|
||||
# Port in the config file won't take affect. Instead we'll use 8388.
|
||||
ENV PORT 8388
|
||||
EXPOSE $PORT
|
||||
|
||||
CMD ssserver -c $CONF -p $PORT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue