From 2bd8c21ff62d459a03fad2b5fa7d45ecb84206cb Mon Sep 17 00:00:00 2001 From: baidongyang Date: Wed, 13 Feb 2019 14:21:41 +0800 Subject: [PATCH] Added Docerfile. --- Dockerfile | 20 ++++++++++++++++++++ README.md | 9 ++++++++- _config.json | 10 ++++++++++ start_ssserver.sh | 3 +++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 _config.json create mode 100755 start_ssserver.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8550ac5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:18.04 + +MAINTAINER bdy1234567@126.com + +# docker build -t ss:1.0 . +# docker run -p host_port:container_port -d ss:1.0 + +# Install dependent packages. +RUN apt update +RUN apt install -y apt-utils vim curl net-tools iputils-ping ssh git make zip unattended-upgrades +RUN unattended-upgrade -d + +RUN apt install -y python-pip +RUN pip install setuptools +RUN pip install git+https://github.com/shadowsocks/shadowsocks.git@master + +COPY config.json /etc/shadowsocks/config.json +COPY start_ssserver.sh /root/start_ssserver.sh + +CMD /bin/bash -c /root/start_ssserver.sh diff --git a/README.md b/README.md index 18989fb..13e2e19 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# docker-ss \ No newline at end of file +# docker-ss +1. Rename _config.json to config.json. +2. Edit config.json, modify **"server_port"** and **"password"** field. +3. Run command: +``` +>$ docker build -t ss:1.0 . +>$ docker run -p host_port:container_port -d ss:1.0 +``` diff --git a/_config.json b/_config.json new file mode 100644 index 0000000..5df1ee6 --- /dev/null +++ b/_config.json @@ -0,0 +1,10 @@ +{ + "server": "::", + "server_port": ****, + "local_address": "127.0.0.1", + "local_port": 1080, + "password": "********************", + "timeout": 300, + "method": "aes-256-gcm", + "fast_open": true +} diff --git a/start_ssserver.sh b/start_ssserver.sh new file mode 100755 index 0000000..fb322d4 --- /dev/null +++ b/start_ssserver.sh @@ -0,0 +1,3 @@ +#!/bin/bash +ulimit -n 51200 +/usr/local/bin/ssserver -c /etc/shadowsocks/config.json start