Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

As I know, docker doesn't support any command that change port mapping after make container.
But this answer said that by changing the hostconfig.json file, I can change port mapping.

How do I assign a port mapping to an existing Docker container?
I'm using docker desktop in windows + WSL2.So path of hostconfig.json is different with other answers.
Where is hostconfig.json?
In my case, (wsl$docker-desktop-datamntwsldocker-desktop-datadata, /var/lib/docker(in wsl)) directories are not exist.

question from:https://stackoverflow.com/questions/65546108/where-is-hostconfig-json-docker-desktop-wsl2-environment

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.6k views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...