请问docker安装SS如何设置开机自启动??
不好意思地问一下??
https://docs.docker.com/config/containers/start-containers-automatically/
docker run -e PASSWORD=7822 -p 8388:8388 -p 8388:8388/udp -d shadowsocks/shadowsocks-libev --restart=always 这样对吗?容器运行得起来,但不能翻墙
同问,运行了,但是不能fq
我有一些在 Container 里运行 shadowsocks 的心得: I have a few tips for running shadowsocks in docker container:
A shell script of ss-docker.sh would be easier:
docker run -d
--name ss1234
-e PASSWORD="YOURPASSWORD"
-e METHOD="aes-256-cfb"
-p YOURPORT:8388
-p YOURPORT:8388/udp
--restart unless-stopped
-d shadowsocks/shadowsocks-libev
- Specify a different port than 8388, it is already well-known port for 8388, so if you live in China, a good chance is that the government's great firewall already blocks it. Please change it to another port.
After you have the container running, try connect it from the host, run: telnet 127.0.0.1:YOURPORT to see if it gets connect. If it get connected, it means your container is listening on this port.
- Make sure your host allow inbound connection to this port from outside. On the VM control panel of your non-China hosts, check the network configuration to allow the inbound connection on the port you chosed.
On your client computer, try run: telnet YOURHOST:YOURPORT to see if it gets through.
-
Check your method and password carefully. Many issues are because the typo or mis-match cipher method. If it is still not working, go on the next step:
-
Give a name for your container, it is handy, otherwise, you need to run docker ps to find out the random generaged container name. If you need to troubleshoot, you need to know the container name.
In this case, ss1234 is the name of the container.
Run docker logs ss1234, this gives you the log file, see what is happening with your container. There is clue such as authentication error, etc.
With the name, you can get a shell access into the docker, so that you can take advantage of all the shadowsocks troubleshooting tips, run: docker exec -it ss1234 sh
This gives you a shell access within the container, if you like bash instead of sh, replace the last sh with bash, but make sure bash is installed. I use a very lightweight SS container, there is no bash inside.
如果还有问题,请把日志贴出来,隐去IP地址 If there is still an issue, please paste your log, hide your IP
按照你的配置已经把我的疑问解决了。非常感谢