docker-compose.yml
compose
version: '3.8'
services:
shadowsocks:
image: shadowsocks/shadowsocks-libev
restart: unless-stopped
ports:
- 12346:12346
- 12346:12346/udp
volumes:
- ./shadowsocks:/etc/shadowsocks-libev
environment:
- DNS_ADDRS=8.8.8.8,8.8.4.4
command: ss-server -c /etc/shadowsocks-libev/config.json
swarm
version: '3.8'
services:
shadowsocks:
image: shadowsocks/shadowsocks-libev
restart: unless-stopped
ports:
- 12346:12346
- 12346:12346/udp
configs:
- source: shadowsocks_config
target: /etc/shadowsocks-libev/config.json
environment:
- DNS_ADDRS=8.8.8.8,8.8.4.4
command: ss-server -c /etc/shadowsocks-libev/config.json
configs:
shadowsocks_config:
file: /root/server/config/shadowsocks/config.json
config.json
{
"server":"0.0.0.0",
"server_port":12346,
"password":"UUID",
"timeout":3000,
"method":"aes-256-gcm",
"fast_open":false,
"mode":"tcp_and_udp"
}
[amd版] 旧版
docker-compose.yml
shadowsocks:
image: appso/shadowsocks-libev
ports:
- 12346:12346
- 12346:12346/udp
volumes:
- ./shadowsocks:/etc/shadowsocks-libev
config.json
{
"server":"0.0.0.0",
"server_port":12346,
"password":"UUID",
"timeout":300,
"method":"aes-256-gcm",
"fast_open":false,
"mode":"tcp_and_udp"
}