The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This approach allows the user to provide a FQDN as hostname if that is what
they want in their container, or to provide distinct host and domain parts. In
both cases we will correctly extract the first token for /etc/hosts.
Signed-off-by: Tim Hockin <thockin@google.com>
Introduced a path level lock to synchronize updates
to /etc/hosts writes. A path level cache is maintained
to only synchronize only at the file level.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
There is no need to update the /etc/hosts files
of containers for endpoints which are created/deleted
in a network whose interface list is empty
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Currently the etchosts package only provides helpers
to completely build an /etc/hosts file from scratch
or update a single hostname's IP address to a different
one. This commit adds the ability to add/delete an arbitrary
number of host record entries to/from the etc hosts file
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>