warn user build.secrets uid,gid,mode are not implemented

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2023-06-14 10:20:36 +02:00
parent 6887a3fc3e
commit d20c2551f2
1 changed files with 4 additions and 0 deletions

View File

@ -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 {