shadowsocks-libev icon indicating copy to clipboard operation
shadowsocks-libev copied to clipboard

How do I change the password for the shadowsocks container?

Open cililianjie opened this issue 7 years ago • 4 comments

I have created a container called shadowsocks. Now I want to change the password of shadowsocks. How do I do this? Thank you!

cililianjie avatar Jul 15 '19 09:07 cililianjie

docker run -e PASSWORD=9MLSpPmNt -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev

Acris avatar Jul 18 '19 02:07 Acris

docker run -e PASSWORD=9MLSpPmNt -p 8388:8388 -p 8388:8388/udp -d --restart always shadowsocks/shadowsocks-libev

这个命令会不会自动拉取一个容器吗

cililianjie avatar Jul 18 '19 17:07 cililianjie

After you started a container, you cannot change the parameter by stopping and restart.

Since Shadowsocks are generally stateless, it is recommended to start a new container. As you already have the image, new container will be created from your existing image, there is no need to download again.

If you have changed some files in your container and want to retain the files, you should commit it as an image, then run it again with new parameters like below:

docker commit CONTAINER_ID new_image docker run [new parameters] new_image

Run docker ps -a to find all CONTAINER_IDs, they are usually an adjective with a human name.

Look at the below dockerfile, it tells you how the password is sent to the process running inside the container: https://hub.docker.com/r/shadowsocks/shadowsocks-libev/dockerfile

rayhu avatar Jul 18 '19 17:07 rayhu

thank you!

cililianjie avatar Jul 22 '19 17:07 cililianjie