aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/ignition.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2021-05-07 14:14:59 -0500
committerBrent Baude <bbaude@redhat.com>2021-06-01 10:13:18 -0500
commit7ef3981abe2412727840a2886489a08c03a05299 (patch)
treea616723311b745a6902199d296c6655d1307497e /pkg/machine/ignition.go
parent7dd463bad1b53802caf3cc1e1e1cc4a250e1667a (diff)
downloadpodman-7ef3981abe2412727840a2886489a08c03a05299.tar.gz
podman-7ef3981abe2412727840a2886489a08c03a05299.tar.bz2
podman-7ef3981abe2412727840a2886489a08c03a05299.zip
Enable port forwarding on host
Using the gvproxy application on the host, we can now port forward from the machine vm on the host. It requires that 'gvproxy' be installed in an executable location. gvproxy can be found in the containers/gvisor-tap-vsock github repo. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/ignition.go')
-rw-r--r--pkg/machine/ignition.go17
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{