Skip to content

Commit

Permalink
feat: compatibility with docker userns-remap (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
proudier authored May 29, 2024
1 parent 0af7049 commit 01d3876
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/runtimes/docker/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func TranslateNodeToContainer(node *k3d.Node) (*NodeInDocker, error) {
// TODO: can we replace this by a reduced set of capabilities?
hostConfig.Privileged = true

// Privileged containers require userns=host when Docker has userns-remap enabled
hostConfig.UsernsMode = "host"

if node.HostPidMode {
hostConfig.PidMode = "host"
}
Expand Down

0 comments on commit 01d3876

Please sign in to comment.