diff options
author | Matej Vasek <mvasek@redhat.com> | 2021-10-23 00:11:41 +0200 |
---|---|---|
committer | Matej Vasek <mvasek@redhat.com> | 2021-10-23 02:42:29 +0200 |
commit | 38c78381ca686b0ef15a93e1a440c6302424bf78 (patch) | |
tree | 88ee6094ee6ffbdd7cbb1badd866e2e17c9e85c3 /pkg/machine | |
parent | 54c630aa0a4dbbddb04ac07b223687aeaa6daefd (diff) | |
download | podman-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.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 } |