Skip to content

Commit

Permalink
Disable docker and alias to podman in FCOS ignition
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Greene <jason.greene@redhat.com>
  • Loading branch information
n1hility committed Sep 22, 2021
1 parent 783ca93 commit 7bee8ba
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pkg/machine/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ ExecStart=/bin/sh -c '/usr/bin/echo Ready >/dev/%s'
[Install]
RequiredBy=multi-user.target
`
overlay := `[Unit]
Description=Overlay /usr/bin mount
[Mount]
Type=overlay
What=overlay
Where=/usr/bin
Options=lowerdir=/opt/bin:/usr/bin
[Install]
WantedBy=multi-user.target
`
_ = ready
ignSystemd := Systemd{
Units: []Unit{
Expand All @@ -101,6 +113,15 @@ RequiredBy=multi-user.target
Name: "ready.service",
Contents: strToPtr(fmt.Sprintf(ready, "vport1p1", "vport1p1")),
},
{
Name: "docker.service",
Mask: boolToPtr(true),
},
{
Enabled: boolToPtr(true),
Name: "usr-bin.mount",
Contents: &overlay,
},
}}
ignConfig := Config{
Ignition: ignVersion,
Expand Down Expand Up @@ -253,5 +274,16 @@ func getLinks(usrName string) []Link {
Hard: boolToPtr(false),
Target: "/home/" + usrName + "/.config/systemd/user/linger-example.service",
},
}, {
Node: Node{
Group: getNodeGrp("root"),
Path: "/opt/bin/docker",
User: getNodeUsr("root"),
Overwrite: boolToPtr(true),
},
LinkEmbedded1: LinkEmbedded1{
Hard: boolToPtr(false),
Target: "/usr/bin/podman",
},
}}
}

0 comments on commit 7bee8ba

Please sign in to comment.