Skip to content

Commit fb0801e

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 e540b7a commit fb0801e

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
@@ -24,7 +24,6 @@ import (
2424
"github.com/docker/docker/api/types/image"
2525
"github.com/docker/docker/api/types/mount"
2626
"github.com/docker/docker/api/types/network"
27-
"github.com/docker/docker/api/types/system"
2827
"github.com/docker/docker/pkg/jsonmessage"
2928
"github.com/docker/docker/pkg/stdcopy"
3029
"github.com/moby/buildkit/client"
@@ -194,17 +193,6 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
194193
hc.CgroupParent = d.cgroupParent
195194
}
196195
}
197-
198-
secOpts, err := system.DecodeSecurityOptions(info.SecurityOptions)
199-
if err != nil {
200-
return err
201-
}
202-
for _, f := range secOpts {
203-
if f.Name == "userns" {
204-
hc.UsernsMode = "host"
205-
break
206-
}
207-
}
208196
}
209197
_, err := d.DockerAPI.ContainerCreate(ctx, cfg, hc, &network.NetworkingConfig{}, nil, d.Name)
210198
if err != nil && !cerrdefs.IsConflict(err) {

0 commit comments

Comments
 (0)