diff options
author | Matej Vasek <mvasek@redhat.com> | 2021-10-23 00:11:41 +0200 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2021-11-12 11:08:25 -0500 |
commit | a208bc24de85f78129859586571fcf25b6793f9e (patch) | |
tree | 76692215fe910bcde0fa9b493f7e8bf379f2060c /pkg | |
parent | 246782133cc36e66db0f4facccd7dabcd76a92d5 (diff) | |
download | podman-a208bc24de85f78129859586571fcf25b6793f9e.tar.gz podman-a208bc24de85f78129859586571fcf25b6793f9e.tar.bz2 podman-a208bc24de85f78129859586571fcf25b6793f9e.zip |
Set DOCKER_HOST in the VM
[NO TESTS NEEDED]
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg')
-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 } |