mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33: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:
@ -116,6 +116,8 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
// moby always create the working directory
|
||||
sg.CreateWorkingDir = true
|
||||
// moby doesn't inherit /etc/hosts from host
|
||||
sg.BaseHostsFile = "none"
|
||||
|
||||
ic := abi.ContainerEngine{Libpod: runtime}
|
||||
report, err := ic.ContainerCreate(r.Context(), sg)
|
||||
|
Reference in New Issue
Block a user