diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-01 19:41:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 19:41:46 +0200 |
commit | cbffdddce6d741eac4f3efa132016aba99683500 (patch) | |
tree | 927b74764e93a47aae61597100502acbe17f1afd /pkg/machine/ignition.go | |
parent | 7a52440a6d7fe7ac1ddccf9fe7247d7abca8ecce (diff) | |
parent | 7ef3981abe2412727840a2886489a08c03a05299 (diff) | |
download | podman-cbffdddce6d741eac4f3efa132016aba99683500.tar.gz podman-cbffdddce6d741eac4f3efa132016aba99683500.tar.bz2 podman-cbffdddce6d741eac4f3efa132016aba99683500.zip |
Merge pull request #10488 from baude/machinehostnetwork
Enable port forwarding on host
Diffstat (limited to 'pkg/machine/ignition.go')
-rw-r--r-- | pkg/machine/ignition.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index 00068a136..a5c7210af 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -118,6 +118,7 @@ func getDirs(usrName string) []Directory { // in one swoop, then the leading dirs are creates as root. newDirs := []string{ "/home/" + usrName + "/.config", + "/home/" + usrName + "/.config/containers", "/home/" + usrName + "/.config/systemd", "/home/" + usrName + "/.config/systemd/user", "/home/" + usrName + "/.config/systemd/user/default.target.wants", @@ -159,6 +160,22 @@ func getFiles(usrName string) []File { }, }) + // Set containers.conf up for core user to use cni networks + // by default + files = append(files, File{ + Node: Node{ + Group: getNodeGrp(usrName), + Path: "/home/" + usrName + "/.config/containers/containers.conf", + User: getNodeUsr(usrName), + }, + FileEmbedded1: FileEmbedded1{ + Append: nil, + Contents: Resource{ + Source: strToPtr("data:,%5Bcontainers%5D%0D%0Anetns%3D%22bridge%22%0D%0Arootless_networking%3D%22cni%22"), + }, + Mode: intToPtr(484), + }, + }) // Add a file into linger files = append(files, File{ Node: Node{ |