Skip to content

Commit 6397d1a

Browse files
committed
driver/docker-container: remove conditional UsernsMode=host for userns
This special handling was added in 5f8600f, to work around an issue in the daemon. That issue was fixed in [moby@a826ca3], which was backported to docker v20.10.13 in [moby@660b996]. Given that docker 20.10 reached EOL, and any currently supported version of docker would have the fix from [moby@a826ca3], we can remove this special handling. [moby@a826ca3]: moby/moby@a826ca3 [moby@660b996]: moby/moby@660b996 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 6e68733 commit 6397d1a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

driver/docker-container/driver.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/docker/docker/api/types/image"
2626
"github.com/docker/docker/api/types/mount"
2727
"github.com/docker/docker/api/types/network"
28-
"github.com/docker/docker/api/types/system"
2928
"github.com/docker/docker/pkg/jsonmessage"
3029
"github.com/docker/docker/pkg/stdcopy"
3130
"github.com/moby/buildkit/client"
@@ -207,17 +206,6 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
207206
hc.CgroupParent = d.cgroupParent
208207
}
209208
}
210-
211-
secOpts, err := system.DecodeSecurityOptions(info.SecurityOptions)
212-
if err != nil {
213-
return err
214-
}
215-
for _, f := range secOpts {
216-
if f.Name == "userns" {
217-
hc.UsernsMode = "host"
218-
break
219-
}
220-
}
221209
}
222210
_, err := d.DockerAPI.ContainerCreate(ctx, cfg, hc, &network.NetworkingConfig{}, nil, d.Name)
223211
if err != nil && !cerrdefs.IsConflict(err) {

0 commit comments

Comments
 (0)