From 36167be43b390f3c3d25812b630f4f325e3d33e3 Mon Sep 17 00:00:00 2001 From: Vladimir Krumshtein Date: Mon, 24 Feb 2020 13:56:56 +0100 Subject: [PATCH] Use s.image for cache generation as well. --- lib/builder/step/from_step.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/builder/step/from_step.go b/lib/builder/step/from_step.go index d7e48b84..9d87e2fd 100644 --- a/lib/builder/step/from_step.go +++ b/lib/builder/step/from_step.go @@ -78,8 +78,8 @@ func (s *FromStep) GetAlias() string { func (s *FromStep) SetCacheID(ctx *context.BuildContext, seed string) error { manifest, err := s.getManifest(ctx.ImageStore) if err != nil { - log.Infof("Could not get manifest: %s. Using hash of from directive as cacheID.", err) - checksum := crc32.ChecksumIEEE([]byte(seed + string(s.directive))) + log.Infof("Could not get manifest: %s. Using hash of from %s as cacheID.", err, string(s.directive)+s.image) + checksum := crc32.ChecksumIEEE([]byte(seed + string(s.directive) + s.image)) s.cacheID = fmt.Sprintf("%x", checksum) return nil }