diff --git a/changelog.d/20241119_111602_fghaas_image_manifest.md b/changelog.d/20241119_111602_fghaas_image_manifest.md new file mode 100644 index 0000000000..28e6cc901c --- /dev/null +++ b/changelog.d/20241119_111602_fghaas_image_manifest.md @@ -0,0 +1,8 @@ +- [Improvement] When building images with + `tutor images build --cache-to-registry`, use an OCI-compliant cache + artifact format that should be universally compatible with all + registries. This enables the use of that option when working with + third-party registries such as [Harbor](https://goharbor.io/) or + [ECR](https://aws.amazon.com/ecr/). Requires + [BuildKit 0.12](https://github.com/moby/buildkit/releases/tag/v0.12.0) + or later. (by @angonz and @fghaas) diff --git a/tutor/commands/images.py b/tutor/commands/images.py index ed3174af63..2a7f53255e 100644 --- a/tutor/commands/images.py +++ b/tutor/commands/images.py @@ -227,7 +227,7 @@ def build( image_build_args.append(f"--cache-from=type=registry,ref={tag}-cache") if cache_to_registry: image_build_args.append( - f"--cache-to=type=registry,mode=max,ref={tag}-cache" + f"--cache-to=type=registry,mode=max,ref={tag}-cache,image-manifest=true" ) # Build contexts