Skip to content

Commit 36c2947

Browse files
author
Ulysses Souza
authored
Merge pull request docker#9012 from notok/rm_containers_when_build_succeed
Remove intermediate containers when build succeeded in classic build
2 parents 6735220 + 3bbcc3d commit 36c2947

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cmd/compose/compose.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ func (o *projectOptions) toProjectOptions(po ...cli.ProjectOptionsFn) (*cli.Proj
212212
cli.WithName(o.ProjectName))...)
213213
}
214214

215+
// PluginName is the name of the plugin
215216
const PluginName = "compose"
216217

217218
// RunningAsStandalone detects when running as a standalone program

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)