0

I previously started a container by using docker run --add-host myserver:123.45.67.89 --name my-container <etc>

Now I want to update THAT container, so that I remove "myserver" from the containers hosts file.

How do I do that?

I basically need docker service update --host-rm for a container and not a service.... Since I haven't put my stuff in a service.

Ideas?

1 Answer 1

0

Stop the docker host service. Then go to the data folder of the designated container.

A location like this: /<docker-root>/containers/<container-id>

Then edit config.v2.json file there and remove the desired extraHosts in the json. Also edit hosts file and remove the lines from it. Save and restart the docker host service.

Done!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .