diff --git a/BUILDING.md b/BUILDING.md index c3cfb235..8f80dd11 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -127,6 +127,29 @@ To revert to using the Containerization dependency from your `Package.swift`: bin/container system start ``` +## Develop using a local copy of container-builder-shim + +To test changes that require the `container-builder-shim` project: + +1. Clone the [container-builder-shim](https://github.com/apple/container-builder-shim) repository and navigate to its directory. + +2. After making the necessary changes, build the custom builder image, set it as the active builder image, and remove the existing `buildkit` container so the new image will be used: + +```bash +container build -t builder . +container system property set image.builder builder:latest +container rm -f buildkit +``` + +3. Run the `container` build as usual: + +```bash +container build ... +``` + +> [!IMPORTANT] +> If your modified builder image is broken, make sure to rebuild and correctly tag the builder image before attempting to build `container-builder-shim` again. + ## Debug XPC Helpers Attach debugger to the XPC helpers using their launchd service labels: