Преглед на файлове

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]>
notok преди 3 години
родител
ревизия
b47d8ea868
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      pkg/compose/build_classic.go

+ 1 - 0
pkg/compose/build_classic.go

@@ -231,6 +231,7 @@ func imageBuildOptions(options buildx.Options) dockertypes.ImageBuildOptions {
 	return dockertypes.ImageBuildOptions{
 		Tags:        options.Tags,
 		NoCache:     options.NoCache,
+		Remove:      true,
 		PullParent:  options.Pull,
 		BuildArgs:   toMapStringStringPtr(options.BuildArgs),
 		Labels:      options.Labels,