How can I make /etc/hosts writable by root in a Docker Container?

后端 未结 4 589
花落未央
花落未央 2021-01-31 18:43

I\'m new to using docker and am configuring a container.
I am unable to edit /etc/hosts (but need to for some software I\'m developing). Auto-edit (via sudo or root) of the

4条回答
  •  萌比男神i
    2021-01-31 19:35

    This is currently a technical limitation of Docker, and is discussed further at https://github.com/dotcloud/docker/issues/2267.

    It will eventually be lifted.

    For now, you need to work around it, e.g. by using a custom dnsmasq server.

提交回复
热议问题