Skip to content

Commit

Permalink
Set DOCKER_HOST in the VM
Browse files Browse the repository at this point in the history
[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek committed Oct 23, 2021
1 parent 54c630a commit 38c7838
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/machine/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 38c7838

Please sign in to comment.