Skip to content

Commit b47d8ea

Browse files
committed
Remove intermediate containers when build succeeded
Intermediate containers remain even when build succeeded when building with classic way (i.e. not with buildkit). Remove them when build succeeded like default behavior of docker build. Signed-off-by: notok <[email protected]>
1 parent 6735220 commit b47d8ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/compose/build_classic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ func imageBuildOptions(options buildx.Options) dockertypes.ImageBuildOptions {
231231
return dockertypes.ImageBuildOptions{
232232
Tags: options.Tags,
233233
NoCache: options.NoCache,
234+
Remove: true,
234235
PullParent: options.Pull,
235236
BuildArgs: toMapStringStringPtr(options.BuildArgs),
236237
Labels: options.Labels,

0 commit comments

Comments
 (0)