Update Dockerfile
This commit is contained in:
parent
0e4253096c
commit
7ad2130eaa
1 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,7 @@ FROM ubuntu:latest
|
||||||
|
|
||||||
MAINTAINER Sah Lee <contact@leesah.name>
|
MAINTAINER Sah Lee <contact@leesah.name>
|
||||||
|
|
||||||
ENV BASEDIR /
|
ENV BASEDIR /tmp
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
@ -25,12 +25,13 @@ RUN apt-get --purge autoremove -y git-core python-setuptools
|
||||||
RUN rm -rf $BASEDIR/shadowsocks
|
RUN rm -rf $BASEDIR/shadowsocks
|
||||||
|
|
||||||
# Config file can be in a separated container
|
# Config file can be in a separated container
|
||||||
ENV CONF /etc/shadowsocks.json
|
ENV CONFIG_DIR /etc/shadowsocks
|
||||||
VOLUME ["$CONF"]
|
ENV CONFIG_FILE $CONFIG_DIR/shadowsocks.json
|
||||||
|
VOLUME ["$CONFIG_DIR"]
|
||||||
|
|
||||||
# Port in the config file won't take affect. Instead we'll use 8388.
|
# Port in the config file won't take affect. Instead we'll use 8388.
|
||||||
ENV PORT 8388
|
ENV PORT 8388
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
# Override the host and port in the config file.
|
# Override the host and port in the config file.
|
||||||
CMD ssserver --fast-open -c $CONF -s 0.0.0.0 -p $PORT
|
CMD ssserver --fast-open -c $CONFIG_FILE -s 0.0.0.0 -p $PORT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue