From 4f0ab1cc8df5958c760006d58dea768954aa0d01 Mon Sep 17 00:00:00 2001 From: Chen Zhiwei Date: Thu, 15 Aug 2019 07:23:32 -0400 Subject: Set Pod hostname as Pod name Signed-off-by: Chen Zhiwei --- libpod/runtime_pod_infra_linux.go | 3 +++ 1 file changed, 3 insertions(+) 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} -- cgit v1.2.3-54-g00ecf