mirror of
https://github.com/docker/compose.git
synced 2025-07-25 14:44:29 +02:00
add default compose labels to images built from bake
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
29308cb97e
commit
5e147e852e
@ -164,6 +164,7 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
build := *service.Build
|
build := *service.Build
|
||||||
|
labels := getImageBuildLabels(project, service)
|
||||||
|
|
||||||
args := types.Mapping{}
|
args := types.Mapping{}
|
||||||
for k, v := range resolveAndMergeBuildArgs(s.dockerCli, project, service, options) {
|
for k, v := range resolveAndMergeBuildArgs(s.dockerCli, project, service, options) {
|
||||||
@ -209,7 +210,7 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
|
|||||||
Dockerfile: dockerFilePath(build.Context, build.Dockerfile),
|
Dockerfile: dockerFilePath(build.Context, build.Dockerfile),
|
||||||
DockerfileInline: strings.ReplaceAll(build.DockerfileInline, "${", "$${"),
|
DockerfileInline: strings.ReplaceAll(build.DockerfileInline, "${", "$${"),
|
||||||
Args: args,
|
Args: args,
|
||||||
Labels: build.Labels,
|
Labels: labels,
|
||||||
Tags: append(build.Tags, api.GetImageNameOrDefault(service, project.Name)),
|
Tags: append(build.Tags, api.GetImageNameOrDefault(service, project.Name)),
|
||||||
|
|
||||||
CacheFrom: build.CacheFrom,
|
CacheFrom: build.CacheFrom,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user