From d20c2551f25ae67dcfdeb00b521d66c5ac89356c Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 14 Jun 2023 10:20:36 +0200 Subject: [PATCH] warn user build.secrets uid,gid,mode are not implemented Signed-off-by: Nicolas De Loof --- pkg/compose/build.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/compose/build.go b/pkg/compose/build.go index 7956a20f7..38c0303b2 100644 --- a/pkg/compose/build.go +++ b/pkg/compose/build.go @@ -38,6 +38,7 @@ import ( "github.com/moby/buildkit/util/entitlements" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/docker/compose/v2/pkg/api" "github.com/docker/compose/v2/pkg/progress" @@ -449,6 +450,9 @@ func addSecretsConfig(project *types.Project, service types.ServiceConfig) (sess default: return nil, fmt.Errorf("build.secrets only supports environment or file-based secrets: %q", secret.Source) } + if secret.UID != "" || secret.GID != "" || secret.Mode != nil { + logrus.Warn("secrets `uid`, `gid` and `mode` are not supported by BuildKit, they will be ignored") + } } store, err := secretsprovider.NewStore(sources) if err != nil {