aboutsummaryrefslogtreecommitdiff
path: root/libpod/runtime_pod_infra_linux.go
diff options
context:
space:
mode:
authorChen Zhiwei <zhiweik@gmail.com>2019-08-15 07:23:32 -0400
committerChen Zhiwei <zhiweik@gmail.com>2019-08-15 07:23:32 -0400
commit4f0ab1cc8df5958c760006d58dea768954aa0d01 (patch)
tree6b6455d78e6c901bd09bfbf61d4592ee38fe1f44 /libpod/runtime_pod_infra_linux.go
parentf9ddf914a37010e77d5367394075c9d90fb2aeae (diff)
downloadpodman-4f0ab1cc8df5958c760006d58dea768954aa0d01.tar.gz
podman-4f0ab1cc8df5958c760006d58dea768954aa0d01.tar.bz2
podman-4f0ab1cc8df5958c760006d58dea768954aa0d01.zip
Set Pod hostname as Pod name
Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
Diffstat (limited to 'libpod/runtime_pod_infra_linux.go')
-rw-r--r--libpod/runtime_pod_infra_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index da35b7f93..24651099f 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -30,6 +30,9 @@ func (r *Runtime) makeInfraContainer(ctx context.Context, p *Pod, imgName, imgID
return nil, err
}
+ // Set Pod hostname as Pod name
+ g.Config.Hostname = p.config.Name
+
isRootless := rootless.IsRootless()
entryCmd := []string{r.config.InfraCommand}