mirror of
https://github.com/containers/podman.git
synced 2025-06-04 04:56:32 +08:00
Fix Docker API compatibility with network alias (#17167)
* Add BaseHostsFile to container configuration * Do not copy /etc/hosts file from host when creating a container using Docker API Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
This commit is contained in:
@ -291,6 +291,12 @@ type ContainerNetworkConfig struct {
|
||||
// bind-mounted inside the container.
|
||||
// Conflicts with HostAdd.
|
||||
UseImageHosts bool
|
||||
// BaseHostsFile is the path to a hosts file, the entries from this file
|
||||
// are added to the containers hosts file. As special value "image" is
|
||||
// allowed which uses the /etc/hosts file from within the image and "none"
|
||||
// which uses no base file at all. If it is empty we should default
|
||||
// to the base_hosts_file configuration in containers.conf.
|
||||
BaseHostsFile string `json:"baseHostsFile,omitempty"`
|
||||
// Hosts to add in container
|
||||
// Will be appended to host's host file
|
||||
HostAdd []string `json:"hostsAdd,omitempty"`
|
||||
|
Reference in New Issue
Block a user