Skip to content

Commit d7a5773

Browse files
committed
make build work on forked repo
Signed-off-by: Dmytro Rashko <dmitriy.rashko@amdocs.com>
1 parent 0cdfa58 commit d7a5773

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/tag.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- name: 'Build Images'
3838
env:
3939
DOCKER_BUILD_ARGS: "--push --platform linux/amd64,linux/arm64"
40+
DOCKER_REPO: "${{ github.repository_owner }}/doc2vec"
4041
run: |
4142
# if workflow_dispatch is used, use the version input
4243
if [ -n "${{ github.event.inputs.version }}" ]; then

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LOCALARCH ?= $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
1515
DOCKER_BUILDER ?= docker buildx
1616
DOCKER_BUILD_ARGS ?= --progress=plain --pull --load --platform linux/$(LOCALARCH)
1717

18-
BUILDX_NO_DEFAULT_ATTESTATIONS=1
18+
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
1919
BUILDX_BUILDER_NAME=kagent-builder
2020

2121
.PHONY: create-builder

mcp/Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Build stage
2-
FROM --platform=linux/$BUILDARCH cgr.dev/chainguard/wolfi-base:latest AS builder
2+
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/wolfi-base:latest AS builder
3+
4+
# Import build arguments for cross-compilation
5+
ARG BUILDPLATFORM
6+
ARG TARGETPLATFORM
7+
ARG TARGETOS
8+
ARG TARGETARCH
39

410
ENV LANG=C.UTF-8
511
ENV LC_ALL=C.UTF-8
@@ -36,6 +42,11 @@ RUN --mount=type=cache,target=/root/.npm \
3642
# Production stage
3743
FROM cgr.dev/chainguard/wolfi-base:latest AS production
3844

45+
# Import build arguments for target platform
46+
ARG TARGETPLATFORM
47+
ARG TARGETOS
48+
ARG TARGETARCH
49+
3950
ENV LANG=C.UTF-8
4051
ENV LC_ALL=C.UTF-8
4152
ENV NODE_ENV=production
@@ -45,8 +56,7 @@ RUN apk update && apk add --no-cache \
4556
nodejs \
4657
ca-certificates \
4758
sqlite \
48-
&& update-ca-certificates \
49-
&& rm -rf /var/cache/apk/*
59+
&& update-ca-certificates
5060

5161
# Create non-root user
5262
RUN addgroup -g 1001 -S nodejs && \

0 commit comments

Comments
 (0)