summaryrefslogtreecommitdiff
path: root/pkg/machine
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-10-23 00:11:41 +0200
committerMatej Vasek <mvasek@redhat.com>2021-10-23 02:42:29 +0200
commit38c78381ca686b0ef15a93e1a440c6302424bf78 (patch)
tree88ee6094ee6ffbdd7cbb1badd866e2e17c9e85c3 /pkg/machine
parent54c630aa0a4dbbddb04ac07b223687aeaa6daefd (diff)
downloadpodman-38c78381ca686b0ef15a93e1a440c6302424bf78.tar.gz
podman-38c78381ca686b0ef15a93e1a440c6302424bf78.tar.bz2
podman-38c78381ca686b0ef15a93e1a440c6302424bf78.zip
Set DOCKER_HOST in the VM
[NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg/machine')
-rw-r--r--pkg/machine/ignition.go18
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
}