diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-27 15:25:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 15:25:21 +0000 |
commit | a05a445f48877006bccf9cd5399279cdfec7a790 (patch) | |
tree | e2b632b264a2f1b545b7e6ff1387182c2f056b9d | |
parent | d908da51fbe0089074355850e7854e0c9502a35a (diff) | |
parent | 38c78381ca686b0ef15a93e1a440c6302424bf78 (diff) | |
download | podman-a05a445f48877006bccf9cd5399279cdfec7a790.tar.gz podman-a05a445f48877006bccf9cd5399279cdfec7a790.tar.bz2 podman-a05a445f48877006bccf9cd5399279cdfec7a790.zip |
Merge pull request #12066 from matejvasek/set-docker-host
Set DOCKER_HOST in the VM
-rw-r--r-- | pkg/machine/ignition.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index e211f5ea6..42d729458 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -304,6 +304,24 @@ machine_enabled=true }, }) + setDockerHost := `export DOCKER_HOST="unix://$(podman info -f "{{.Host.RemoteSocket.Path}}")" +` + + files = append(files, File{ + Node: Node{ + Group: getNodeGrp("root"), + Path: "/etc/profile.d/docker-host.sh", + User: getNodeUsr("root"), + }, + FileEmbedded1: FileEmbedded1{ + Append: nil, + Contents: Resource{ + Source: encodeDataURLPtr(setDockerHost), + }, + Mode: intToPtr(0644), + }, + }) + return files } |