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