From 441bcb56d7705590465a8e4d1e5d6d7645dadb0b Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Mon, 6 Dec 2021 14:26:43 -0800 Subject: [PATCH] Skip WithAdditionalGIDs on Darwin Signed-off-by: Maksym Pavlenko --- oci/spec_opts.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/oci/spec_opts.go b/oci/spec_opts.go index 1f57737be..65b4bfcae 100644 --- a/oci/spec_opts.go +++ b/oci/spec_opts.go @@ -23,6 +23,7 @@ import ( "fmt" "os" "path/filepath" + "runtime" "strconv" "strings" @@ -35,7 +36,7 @@ import ( "github.com/containerd/continuity/fs" v1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/opencontainers/runc/libcontainer/user" - specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) @@ -729,8 +730,8 @@ func WithUsername(username string) SpecOpts { // The passed in user can be either a uid or a username. func WithAdditionalGIDs(userstr string) SpecOpts { return func(ctx context.Context, client Client, c *containers.Container, s *Spec) (err error) { - // For LCOW additional GID's not supported - if s.Windows != nil { + // For LCOW or on Darwin additional GID's not supported + if s.Windows != nil || runtime.GOOS == "darwin" { return nil } setProcess(s)