mirror of https://github.com/docker/compose.git
local.compose.build: Ensure images are exported
If a user has BUILDX_NO_DEFAULT_LOAD=1 set, then the images will not be stored in the image store unless we explicitly say that they must be. Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
parent
ddaec1a367
commit
87153b9d25
1
go.mod
1
go.mod
|
@ -38,6 +38,7 @@ require (
|
|||
github.com/joho/godotenv v1.3.0
|
||||
github.com/labstack/echo v3.3.10+incompatible
|
||||
github.com/labstack/gommon v0.3.0 // indirect
|
||||
github.com/moby/buildkit v0.8.1-0.20201205083753-0af7b1b9c693
|
||||
github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf
|
||||
github.com/morikuni/aec v1.0.0
|
||||
github.com/opencontainers/go-digest v1.0.0
|
||||
|
|
|
@ -29,6 +29,7 @@ import (
|
|||
_ "github.com/docker/buildx/driver/docker" // required to get default driver registered
|
||||
"github.com/docker/buildx/util/progress"
|
||||
"github.com/docker/docker/errdefs"
|
||||
bclient "github.com/moby/buildkit/client"
|
||||
)
|
||||
|
||||
func (s *composeService) Build(ctx context.Context, project *types.Project) error {
|
||||
|
@ -154,6 +155,7 @@ func (s *composeService) toBuildOptions(service types.ServiceConfig, contextPath
|
|||
BuildArgs: flatten(mergeArgs(service.Build.Args, buildArgs)),
|
||||
Tags: tags,
|
||||
Target: service.Build.Target,
|
||||
Exports: []bclient.ExportEntry{{Type: "image", Attrs: map[string]string{}}},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue