Skip to content

Commit

Permalink
Added Docerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeejio committed Feb 13, 2019
1 parent 4131a28 commit 2bd8c21
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:18.04

MAINTAINER [email protected]

# 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
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# docker-ss
# 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
```
10 changes: 10 additions & 0 deletions _config.json
Original file line number Diff line number Diff line change
@@ -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
}
3 changes: 3 additions & 0 deletions start_ssserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
ulimit -n 51200
/usr/local/bin/ssserver -c /etc/shadowsocks/config.json start

0 comments on commit 2bd8c21

Please sign in to comment.