vendor: github.com/docker/docker 3e32104e0e39af9019a3ea9aa7093bb7c97fcf05

syncing with latest master

full diff: cb01202de8...3e32104e0e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-06-01 11:15:00 +02:00
parent 84b86e23b7
commit 86a7a7aa73
6 changed files with 14 additions and 9 deletions

View File

@ -4656,7 +4656,7 @@ definitions:
type: "object"
x-go-name: "WaitResponse"
title: "ContainerWaitResponse"
required: [StatusCode, Error]
required: [StatusCode]
properties:
StatusCode:
description: "Exit code of the container"

View File

@ -10,8 +10,7 @@ package container
type WaitResponse struct {
// error
// Required: true
Error *WaitExitError `json:"Error"`
Error *WaitExitError `json:"Error,omitempty"`
// Exit code of the container
// Required: true

View File

@ -18,12 +18,14 @@ import (
"syscall"
"time"
"github.com/containerd/containerd/pkg/userns"
"github.com/docker/docker/pkg/fileutils"
"github.com/docker/docker/pkg/idtools"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/pools"
"github.com/docker/docker/pkg/system"
"github.com/klauspost/compress/zstd"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
exec "golang.org/x/sys/execabs"
)
@ -766,7 +768,11 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, L
chownOpts = &idtools.Identity{UID: hdr.Uid, GID: hdr.Gid}
}
if err := os.Lchown(path, chownOpts.UID, chownOpts.GID); err != nil {
return err
msg := "failed to Lchown %q for UID %d, GID %d"
if errors.Is(err, syscall.EINVAL) && userns.RunningInUserNS() {
msg += " (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid)"
}
return errors.Wrapf(err, msg, path, hdr.Uid, hdr.Gid)
}
}