Compare commits

...

3 Commits

Author SHA1 Message Date
Pierre Roudier 85347bdcf3
test: fix translate.go test following userns merge (#1444) 1 month ago
allcontributors[bot] 58a5df6c39
docs: add proudier as a contributor for code (#1443) 1 month ago
Pierre Roudier 01d3876fab
feat: compatibility with docker userns-remap (#1442) 1 month ago
  1. 11
      .all-contributorsrc
  2. 3
      README.md
  3. 3
      pkg/runtimes/docker/translate.go
  4. 1
      pkg/runtimes/docker/translate_test.go

@ -240,7 +240,7 @@
"profile": "https://github.com/dbreyfogle",
"contributions": [
"doc"
]
]
},
{
"login": "aabouzaid",
@ -252,6 +252,15 @@
"code",
"doc"
]
},
{
"login": "proudier",
"name": "Pierre Roudier",
"avatar_url": "https://avatars.githubusercontent.com/u/1056127?v=4",
"profile": "https://roudier.io",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

@ -8,7 +8,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/k3d-io/k3d?style=flat-square)](https://goreportcard.com/report/github.com/k3d-io/k3d)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-27-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
@ -167,6 +167,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stopanko"><img src="https://avatars.githubusercontent.com/u/3759349?v=4?s=100" width="100px;" alt="stopanko"/><br /><sub><b>stopanko</b></sub></a><br /><a href="#financial-stopanko" title="Financial">πŸ’΅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dbreyfogle"><img src="https://avatars.githubusercontent.com/u/27653146?v=4?s=100" width="100px;" alt="Danny Breyfogle"/><br /><sub><b>Danny Breyfogle</b></sub></a><br /><a href="https://github.com/k3d-io/k3d/commits?author=dbreyfogle" title="Documentation">πŸ“–</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tech.aabouzaid.com/"><img src="https://avatars.githubusercontent.com/u/6760103?v=4?s=100" width="100px;" alt="Ahmed AbouZaid"/><br /><sub><b>Ahmed AbouZaid</b></sub></a><br /><a href="#ideas-aabouzaid" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/k3d-io/k3d/commits?author=aabouzaid" title="Code">πŸ’»</a> <a href="https://github.com/k3d-io/k3d/commits?author=aabouzaid" title="Documentation">πŸ“–</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://roudier.io"><img src="https://avatars.githubusercontent.com/u/1056127?v=4?s=100" width="100px;" alt="Pierre Roudier"/><br /><sub><b>Pierre Roudier</b></sub></a><br /><a href="https://github.com/k3d-io/k3d/commits?author=proudier" title="Code">πŸ’»</a></td>
</tr>
</tbody>
</table>

@ -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"
}

@ -81,6 +81,7 @@ func TestTranslateNodeToContainer(t *testing.T) {
},
Init: &init,
Privileged: true,
UsernsMode: "host",
Tmpfs: map[string]string{"/run": "", "/var/run": ""},
PortBindings: nat.PortMap{
"6443/tcp": {

Loading…
Cancel
Save