mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-21 10:21:00 +02:00
Merge pull request #370 from vbehar/cleanup-flag
Add a new flag to cleanup the filesystem at the end
This commit is contained in:
@@ -33,4 +33,5 @@ type KanikoOptions struct {
|
||||
Reproducible bool
|
||||
NoPush bool
|
||||
Cache bool
|
||||
Cleanup bool
|
||||
}
|
||||
|
||||
@@ -264,6 +264,11 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if opts.Cleanup {
|
||||
if err = util.DeleteFilesystem(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return sourceImage, nil
|
||||
}
|
||||
if stage.SaveStage {
|
||||
|
||||
Reference in New Issue
Block a user