diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-19 13:33:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 13:33:15 +0200 |
commit | 98dee275d04dafa087db12bc3f0593a078039cfb (patch) | |
tree | 51a0fbeae3dd23c6c29c4b74e6a6503557e74a39 /libpod/runtime_pod_linux.go | |
parent | 438cbf4c8960db0b59a25a3fb38a778e24a69a40 (diff) | |
parent | 7aefc1ac33ba153f6177e9fe3c4da886de49a9e2 (diff) | |
download | podman-98dee275d04dafa087db12bc3f0593a078039cfb.tar.gz podman-98dee275d04dafa087db12bc3f0593a078039cfb.tar.bz2 podman-98dee275d04dafa087db12bc3f0593a078039cfb.zip |
Merge pull request #3836 from chenzhiwei/hostname
Allow customizing pod hostname
Diffstat (limited to 'libpod/runtime_pod_linux.go')
-rw-r--r-- | libpod/runtime_pod_linux.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go index f38e6e7c1..073c5054d 100644 --- a/libpod/runtime_pod_linux.go +++ b/libpod/runtime_pod_linux.go @@ -52,6 +52,10 @@ func (r *Runtime) NewPod(ctx context.Context, options ...PodCreateOption) (_ *Po pod.config.Name = name } + if pod.config.Hostname == "" { + pod.config.Hostname = pod.config.Name + } + // Allocate a lock for the pod lock, err := r.lockManager.AllocateLock() if err != nil { |