Skip to content

Commit 7527b3a

Browse files
build: include LICENSE in gateway-builder image
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.
1 parent 04346b4 commit 7527b3a

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ platform-api/src/resources/openapi_with_binding.yaml
142142
# Gateway
143143
gateway/gateway-runtime/target
144144
gateway/gateway-controller/target/
145+
gateway/gateway-builder/target/
145146
event-gateway/gateway-runtime/target/
146147
dev-policies/
147148

gateway/gateway-builder/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ COPY --from=system-policies . /api-platform/gateway/system-policies
9797
COPY --from=common . /api-platform/common
9898
COPY --from=sdk-core . /api-platform/sdk/core
9999
COPY --from=sdk-python . /api-platform/sdk-python
100+
COPY --from=target LICENSE /app/LICENSE
100101

101102
# Set working directory
102103
WORKDIR /workspace

gateway/gateway-builder/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ help: ## Show this help message
5656
.PHONY: build
5757
build: ## Build Docker image using buildx
5858
@echo "Building Docker image ($(IMAGE_NAME):$(VERSION))..."
59+
@mkdir -p target
60+
@cp ../../LICENSE target/
5961
@docker buildx build -f Dockerfile \
6062
--build-context policy-engine=../gateway-runtime/policy-engine \
6163
--build-context python-executor=../gateway-runtime/python-executor \
@@ -64,6 +66,7 @@ build: ## Build Docker image using buildx
6466
--build-context sdk-core=../../sdk/core \
6567
--build-context sdk-python=../../sdk-python \
6668
--build-context common=../../common \
69+
--build-context target=target \
6770
--build-arg VERSION=$(VERSION) \
6871
--build-arg GIT_COMMIT=$(GIT_COMMIT) \
6972
-t $(IMAGE_NAME):$(VERSION) \
@@ -81,6 +84,8 @@ push: ## Push Docker image to registry
8184
.PHONY: build-and-push-multiarch
8285
build-and-push-multiarch: ## Build and push multi-architecture Docker image (linux/amd64, linux/arm64)
8386
@echo "Building and pushing multi-arch Docker image: $(IMAGE_NAME):$(VERSION)"
87+
@mkdir -p target
88+
@cp ../../LICENSE target/
8489
docker buildx build -f Dockerfile \
8590
--build-context policy-engine=../gateway-runtime/policy-engine \
8691
--build-context python-executor=../gateway-runtime/python-executor \
@@ -89,6 +94,7 @@ build-and-push-multiarch: ## Build and push multi-architecture Docker image (lin
8994
--build-context sdk-core=../../sdk/core \
9095
--build-context sdk-python=../../sdk-python \
9196
--build-context common=../../common \
97+
--build-context target=target \
9298
--platform linux/amd64,linux/arm64 \
9399
--build-arg VERSION=$(VERSION) \
94100
--build-arg GIT_COMMIT=$(GIT_COMMIT) \

0 commit comments

Comments
 (0)