Skip to content

Commit

Permalink
Skip WithAdditionalGIDs on Darwin
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
  • Loading branch information
mxpv committed Dec 6, 2021
1 parent 753f95e commit 441bcb5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions oci/spec_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"

Expand All @@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 441bcb5

Please sign in to comment.