Skip to content

Patrick-Remy/buildkit-missing-layer-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BuildKit missing layer bug example

This repository aims to easily reproduce a current BuildKit bug (at least reproducible since dda009a).

🐛 Bug description

When using raw buildctl commands to build this Dockerfile and export caches, then import them, there is a big chance that the resulting image misses the /docker-entrypoint.sh.

Reproduce it!

HINT: Ensure to be an enough priviliged user, to delete files and folders created by the buildkit container.

Clone this repository and run ./build-script.sh. It will take some time, to execute the required steps. On finish it will either:

  • Exit 1 image/docker-entrypoint.sh is missing!, the resulting image will be in the image directory.
  • Exit 0 Reached max number of retries to reproduce issue, setup seems not to be affected, either the used buildkit version or some modifications on Dockerfile or files in the build context lead to a successful build.

You can adjust the used buildkit image by setting the environment variable BUILDKIT_IMAGE=your/buildkit:12345-rootless.

⚠️ Caution when modifying the Dockerfile

In my personal experience of reproducing, when trying to remove any of the statements in the Dockerfile, the script no more fails.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published