build: include LICENSE in gateway and event-gateway images#1969
Conversation
Stage the repo-root LICENSE into each image's /app/LICENSE via the target/ build-context pattern across both regular and multi-arch builds (and debug/coverage variants). - gateway/gateway-runtime, gateway-controller - event-gateway/gateway-runtime, event-gateway-controller - add target/ build-context to gateway-controller (was absent) - gitignore the new gateway-controller and event-gateway-runtime target/ dirs Templated Dockerfiles inherit /app/LICENSE from the updated base images, so no template changes are needed.
📝 WalkthroughWalkthroughThis PR implements LICENSE file distribution across Docker images for gateway and event-gateway components. A temporary target directory is created during build, LICENSE is copied into it and passed to Docker as a build context, then included in final runtime and controller images via Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Stage the repo-root LICENSE into /app/LICENSE for the gateway-builder image, matching the pattern already used by gateway-runtime, gateway-controller, and event-gateway-runtime. - Add target/ build-context with LICENSE for both build and build-and-push-multiarch targets. - Place at /app/LICENSE (consistent with other images); /workspace is reserved for user policy projects mounted at runtime. - Gitignore the new gateway-builder/target/ directory.
Purpose
The gateway and event-gateway Docker images did not ship the Apache License 2.0 text, which is required for distribution compliance.
Approach
LICENSEinto each image's/app/LICENSEvia the existingtarget/build-context pattern.gateway/gateway-runtime,gateway/gateway-controller,gateway/gateway-builderevent-gateway/gateway-runtime,event-gateway-controllertarget/build-context togateway-controllerandgateway-builder(which previously didn't use one) and clean it up after each build where appropriate.gateway/gateway-controller/target/,gateway/gateway-builder/target/, andevent-gateway/gateway-runtime/target/directories.gateway-builder) inherit/app/LICENSEautomatically, so no template changes were needed.Related Issues
Fixes #1968
Test environment
Verified after building locally and running via
docker compose/docker run:Gateway Controller
Gateway Runtime
Gateway Builder
Documentation
N/A — no doc impact; this is a packaging change to embed the existing repo-root
LICENSEin the published images.Automation tests
Security checks
Samples
N/A
Related PRs
N/A