diff --git a/.github/workflows/auth-service-cd.yml b/.github/workflows/auth-service-cd.yml index 6b104a1..c862118 100644 --- a/.github/workflows/auth-service-cd.yml +++ b/.github/workflows/auth-service-cd.yml @@ -49,4 +49,4 @@ jobs: push: true context: "{{defaultContext}}:cmd/auth" tags: vcscsvcscs/gheritage-auth-service:${{steps.create_image_tag.outputs.result}} - platforms: linux/arm64 + platforms: linux/amd64, linux/arm64 diff --git a/.github/workflows/backend-cd.yml b/.github/workflows/backend-cd.yml index b625a72..8635e63 100644 --- a/.github/workflows/backend-cd.yml +++ b/.github/workflows/backend-cd.yml @@ -49,4 +49,4 @@ jobs: push: true context: "{{defaultContext}}:cmd/backend" tags: vcscsvcscs/gheritage-backend-service:${{steps.create_image_tag.outputs.result}} - platforms: linux/arm64 + platforms: linux/amd64, linux/arm64 diff --git a/cmd/auth/dockerfile b/cmd/auth/dockerfile index 4432ddb..9ea655f 100644 --- a/cmd/auth/dockerfile +++ b/cmd/auth/dockerfile @@ -1,4 +1,4 @@ -FROM arm64v8/golang:1.23.4-alpine AS build +FROM --platform=$BUILDPLATFORM golang:alpine AS build WORKDIR /app @@ -6,11 +6,11 @@ COPY . . RUN go get ./... -RUN GOOS=linux GOARCH=arm64 go build -o auth-service +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o auth-service RUN apk update && apk add ca-certificates && update-ca-certificates -FROM arm64v8/busybox:1.36.1 +FROM --platform=$TARGETPLATFORM busybox:1.36.1 COPY --from=build /etc/ssl/certs /etc/ssl/certs COPY --from=build /app/auth-service /app/ diff --git a/cmd/backend/dockerfile b/cmd/backend/dockerfile index 29ec584..a34b672 100644 --- a/cmd/backend/dockerfile +++ b/cmd/backend/dockerfile @@ -1,4 +1,4 @@ -FROM arm64v8/golang:1.23.4-alpine AS build +FROM --platform=$BUILDPLATFORM golang:alpine AS build WORKDIR /app @@ -6,11 +6,11 @@ COPY . . RUN go get ./... -RUN GOOS=linux GOARCH=arm64 go build -o backend +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o backend RUN apk update && apk add ca-certificates && update-ca-certificates -FROM arm64v8/busybox:1.36.1 +FROM --platform=$TARGETPLATFORM busybox:1.36.1 COPY --from=build /etc/ssl/certs /etc/ssl/certs COPY --from=build /app/backend /app/