mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 10:39:18 +02:00
This fixes a bug in the interaction between volumes in base images (#555)
and our snapshot optimizations. If a previous base image has a volume, the directory is added to the list of files to snapshot. That directory may not actually exist in the image.
This commit is contained in:
@@ -285,11 +285,8 @@ func (s *stageBuilder) takeSnapshot(files []string) (string, error) {
|
||||
if files == nil || s.opts.SingleSnapshot {
|
||||
snapshot, err = s.snapshotter.TakeSnapshotFS()
|
||||
} else {
|
||||
// Volumes are very weird. They get created in their command, but snapshotted in the next one.
|
||||
// Add them to the list of files to snapshot.
|
||||
for v := range s.cf.Config.Volumes {
|
||||
files = append(files, v)
|
||||
}
|
||||
// Volumes are very weird. They get snapshotted in the next command.
|
||||
files = append(files, util.Volumes()...)
|
||||
snapshot, err = s.snapshotter.TakeSnapshot(files)
|
||||
}
|
||||
timing.DefaultRun.Stop(t)
|
||||
|
||||
Reference in New Issue
Block a user