You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using Docker for ten years, and I have never experienced something unexplainable and hard to figure out.
I'm running a build inside AWS CodeBuild CI. Using S3 caching as well, as well as ECR for publishing final images.
The build happens in two stages, inside two different CodeBuild runners.
base stage
app stage
When the app builds, it reuses all layers correctly from the base layer (pulls from S3/ECR), but the last layer always gets rebuilt.
I've ran two builds, via the pipeline, by triggering the exact same commit hash on both builds, so it should, in theory always result in the exact same output.
When I pulled these images from ECR to my local, and examined them with dive tool, I see that every layer up to the last one, is always reused, and the digest remains the same. But then, the last layer is always rebuilt and results in a different digest.
How's that even possible?
Under which conditions would the last layer invalidate, given that the layer just before it is identical?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been using Docker for ten years, and I have never experienced something unexplainable and hard to figure out.
I'm running a build inside AWS CodeBuild CI. Using S3 caching as well, as well as ECR for publishing final images.
The build happens in two stages, inside two different CodeBuild runners.
base
stageapp
stageWhen the app builds, it reuses all layers correctly from the base layer (pulls from S3/ECR), but the last layer always gets rebuilt.
I've ran two builds, via the pipeline, by triggering the exact same commit hash on both builds, so it should, in theory always result in the exact same output.
When I pulled these images from ECR to my local, and examined them with dive tool, I see that every layer up to the last one, is always reused, and the digest remains the same. But then, the last layer is always rebuilt and results in a different digest.
How's that even possible?
Under which conditions would the last layer invalidate, given that the layer just before it is identical?
The build command is:
Beta Was this translation helpful? Give feedback.
All reactions