Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admission-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} node:lts AS builder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option should be set for builders, it's what allows the cross compilation to be fast.

Copy link
Author

@joornby-angel joornby-angel Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a little more reading. I'll modify the final host image platform to make sure the runtime looks right. While I do that, do you know:

  1. If the GO compiler needs to be run through the target platform? I did a little more reading on this, and decided it's not a concern based on the GO compilation commands in the docker images.
  2. If there are any node modules that pull in architecture dependent native binaries?

FROM node:lts AS builder

WORKDIR /app

Expand All @@ -20,7 +20,7 @@ RUN pnpm run --filter=./admission-server build
# Deploy
RUN pnpm --filter=./admission-server --prod deploy pruned

FROM --platform=${BUILDPLATFORM} node:lts-slim
FROM node:lts-slim

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions cdn-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} node:lts AS builder
FROM node:lts AS builder

WORKDIR /app

Expand All @@ -21,7 +21,7 @@ RUN pnpm run --filter=./cdn-server/cdn --filter=./cdn-server build
# Deploy
RUN pnpm --filter=./cdn-server --prod deploy pruned

FROM --platform=${BUILDPLATFORM} node:lts-slim
FROM node:lts-slim

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions controlplane/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} node:lts AS builder
FROM node:lts AS builder

ARG TARGETARCH

Expand Down Expand Up @@ -32,7 +32,7 @@ RUN curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/relea
# Deploy
RUN pnpm --filter=./controlplane --prod deploy pruned

FROM --platform=${BUILDPLATFORM} node:lts-alpine
FROM node:lts-alpine

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions graphqlmetrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} golang:1.25 AS builder
FROM golang:1.25 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand All @@ -23,7 +23,7 @@ RUN make test
# Build router
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -ldflags "-extldflags -static -X github.com/wundergraph/cosmo/graphqlmetrics/core.Version=${VERSION}" -a -o graphqlmetrics cmd/main.go

FROM --platform=${BUILDPLATFORM} gcr.io/distroless/base-debian12
FROM gcr.io/distroless/base-debian12

COPY --from=builder /app/graphqlmetrics /graphqlmetrics
COPY --from=builder /app/migrations /migrations
Expand Down
6 changes: 3 additions & 3 deletions keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} timbru31/java-node:17-jdk-18
FROM timbru31/java-node:17-jdk-18

WORKDIR /app

Expand All @@ -12,7 +12,7 @@ COPY ./theme .

RUN ./build.sh

FROM --platform=${BUILDPLATFORM} bitnamilegacy/keycloak:26.2.5
FROM bitnamilegacy/keycloak:26.2.5

COPY --from=0 /app/target/*.jar /opt/bitnami/keycloak/providers/

Expand All @@ -22,4 +22,4 @@ COPY --from=0 /app/target/*.jar /opt/bitnami/keycloak/providers/
RUN /opt/bitnami/keycloak/bin/kc.sh build --db=postgres --metrics-enabled true --health-enabled true --http-relative-path "/"

EXPOSE 8080
EXPOSE 8443
EXPOSE 8443
4 changes: 2 additions & 2 deletions otelcollector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} golang:1.25 AS builder
FROM golang:1.25 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand All @@ -16,7 +16,7 @@ RUN ./ocb --config otelcol-builder.yaml \
&& chmod +x /app/otelcol-dev/otelcol \
&& /app/otelcol-dev/otelcol --version

FROM --platform=${BUILDPLATFORM} golang:1.25
FROM golang:1.25

COPY ./otel-config.yaml /etc/otel-config.yaml
COPY --from=builder /app/otelcol-dev/otelcol /otelcol
Expand Down
6 changes: 3 additions & 3 deletions router/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} golang:1.25 AS builder
FROM golang:1.25 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down Expand Up @@ -31,7 +31,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
-X 'github.com/wundergraph/cosmo/router/core.Date=${DATE}'" \
-a -o router cmd/router/main.go

FROM --platform=${BUILDPLATFORM} gcr.io/distroless/base-debian12:nonroot AS nonroot
FROM gcr.io/distroless/base-debian12:nonroot AS nonroot

# nonroot user uid
USER 65532
Expand All @@ -45,7 +45,7 @@ CMD ["/router"]

EXPOSE 3002

FROM --platform=${BUILDPLATFORM} gcr.io/distroless/base-debian12
FROM gcr.io/distroless/base-debian12

COPY --from=builder /app/router /router

Expand Down
6 changes: 3 additions & 3 deletions studio/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} node:lts AS builder
FROM node:lts AS builder

WORKDIR /app

Expand Down Expand Up @@ -45,7 +45,7 @@ RUN pnpm buf generate --template buf.ts.gen.yaml

RUN pnpm run --filter=./connect --filter=./shared --filter=./studio --filter=./composition build

FROM --platform=${BUILDPLATFORM} node:lts-alpine
FROM node:lts-alpine

WORKDIR /app

Expand All @@ -68,4 +68,4 @@ EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME=localhost

CMD ["node", "./studio/server.js"]
CMD ["node", "./studio/server.js"]