Added shadowsocks-go docker image
Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
parent
297e17a93b
commit
d9da3927e9
2
docker/shadowsocks-go/.dockerignore
Normal file
2
docker/shadowsocks-go/.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
.dockerignore
|
||||||
|
README.md
|
||||||
28
docker/shadowsocks-go/Dockerfile
Normal file
28
docker/shadowsocks-go/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Dockerfile for Shadowsocks-go based alpine
|
||||||
|
# Copyright (C) 2018 Teddysun <i@teddysun.com>
|
||||||
|
# Reference URL:
|
||||||
|
# https://github.com/shadowsocks/shadowsocks-go
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
LABEL maintainer="Teddysun <i@teddysun.com>"
|
||||||
|
|
||||||
|
RUN runDeps="\
|
||||||
|
wget \
|
||||||
|
"; \
|
||||||
|
set -ex \
|
||||||
|
&& apk add --no-cache --virtual .build-deps ${runDeps} \
|
||||||
|
&& mkdir /lib64 \
|
||||||
|
&& ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 \
|
||||||
|
&& cd /tmp \
|
||||||
|
&& wget -qO shadowsocks-server-linux64-1.2.1.gz https://dl.lamp.sh/shadowsocks/shadowsocks-server-linux64-1.2.1.gz \
|
||||||
|
&& gzip -d shadowsocks-server-linux64-1.2.1.gz \
|
||||||
|
&& chmod 755 shadowsocks-server-linux64-1.2.1 \
|
||||||
|
&& mv shadowsocks-server-linux64-1.2.1 /usr/bin/shadowsocks-server \
|
||||||
|
&& apk del .build-deps
|
||||||
|
|
||||||
|
COPY config_sample.json /etc/shadowsocks-go/config.json
|
||||||
|
VOLUME /etc/shadowsocks-go
|
||||||
|
|
||||||
|
USER nobody
|
||||||
|
|
||||||
|
CMD [ "shadowsocks-server", "-c", "/etc/shadowsocks-go/config.json" ]
|
||||||
52
docker/shadowsocks-go/README.md
Normal file
52
docker/shadowsocks-go/README.md
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
## Shadowsocks-go Docker Image by Teddysun
|
||||||
|
|
||||||
|
[Shadowsocks-go][1] is a lightweight tunnel proxy which can help you get through firewalls.
|
||||||
|
It is a port of [Shadowsocks][2] created by @cyfdecyf.
|
||||||
|
|
||||||
|
Docker images are built for quick deployment in various computing cloud providers.
|
||||||
|
For more information on docker and containerization technologies, refer to [official document][3].
|
||||||
|
|
||||||
|
## Prepare the host
|
||||||
|
|
||||||
|
If you need to install docker by yourself, follow the [official installation guide][4].
|
||||||
|
|
||||||
|
## Pull the image
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker pull teddysun/shadowsocks-go
|
||||||
|
```
|
||||||
|
|
||||||
|
This pulls the latest release of shadowsocks-go.
|
||||||
|
|
||||||
|
It can be found at [Docker Hub][5].
|
||||||
|
|
||||||
|
## Start a container
|
||||||
|
|
||||||
|
You **must create a configuration file** `/etc/shadowsocks-go/config.json` in host at first, and sample:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"server":"0.0.0.0",
|
||||||
|
"server_port":9000,
|
||||||
|
"local_port":1080,
|
||||||
|
"password":"password0",
|
||||||
|
"method":"aes-256-cfb",
|
||||||
|
"timeout":120
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This container with sample configuration `/etc/shadowsocks-go/config.json`
|
||||||
|
|
||||||
|
There is an example to start a container that listens on `9000` (both TCP and UDP):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker run -d -p 9000:9000 -p 9000:9000/udp --name ss-go -v /etc/shadowsocks-go:/etc/shadowsocks-go teddysun/shadowsocks-go
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: The port number must be same as configuration.
|
||||||
|
|
||||||
|
[1]: https://github.com/shadowsocks/shadowsocks-go
|
||||||
|
[2]: https://shadowsocks.org/en/index.html
|
||||||
|
[3]: https://docs.docker.com/
|
||||||
|
[4]: https://docs.docker.com/install/
|
||||||
|
[5]: https://hub.docker.com/r/teddysun/shadowsocks-go/
|
||||||
8
docker/shadowsocks-go/config_sample.json
Normal file
8
docker/shadowsocks-go/config_sample.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"server":"0.0.0.0",
|
||||||
|
"server_port":9000,
|
||||||
|
"local_port":1080,
|
||||||
|
"password":"password0",
|
||||||
|
"method":"aes-256-cfb",
|
||||||
|
"timeout":120
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user