Skip to content

Commit

Permalink
Mount static kmod as /sbin/modprobe
Browse files Browse the repository at this point in the history
  • Loading branch information
vigh-m committed May 30, 2024
1 parent 349713d commit f0c029f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/containerd/containerd-cri-base-json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ oci-defaults = { version = "v1", helpers = ["oci_defaults"] }
"mode=755",
"size=65536k"
]
},
{
"destination": "/sbin/modprobe",
"source": "/usr/bin/kmod",
"options": [
"exec",
"bind",
"ro"
]
}
],
"linux": {
Expand Down
6 changes: 6 additions & 0 deletions sources/host-ctr/cmd/host-ctr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,12 @@ func withPrivilegedMounts() oci.SpecOpts {
Source: "/mnt",
Type: "bind",
},
{
Options: []string{"rbind", "ro"},
Destination: "/sbin/modprobe",
Source: "/usr/bin/kmod",
Type: "bind",
},
})
}

Expand Down

0 comments on commit f0c029f

Please sign in to comment.