Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat: Docker arm64 builds (#2453)

rennokki5219bb74ac87
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 62ac80ea23..9d7da94efe 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -259,6 +259,14 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ with:
+ driver-opts: network=host
+
- name: Extract metadata (tags, labels) for Docker
id: meta-web
uses: docker/metadata-action@v4
@@ -282,6 +290,9 @@ jobs:
push: true
tags: ${{ steps.meta-web.outputs.tags }}
labels: ${{ steps.meta-web.outputs.labels }}
+ platforms: |
+ linux/amd64
+ linux/arm64
- name: Extract metadata (tags, labels) for Docker
id: meta-worker
@@ -306,3 +317,6 @@ jobs:
push: true
tags: ${{ steps.meta-worker.outputs.tags }}
labels: ${{ steps.meta-worker.outputs.labels }}
+ platforms: |
+ linux/amd64
+ linux/arm64
diff --git a/web/Dockerfile b/web/Dockerfile
index 4aa75995fa..3d7796b782 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -1,10 +1,10 @@
-FROM node:20-alpine3.20 AS alpine
+FROM --platform=$BUILDPLATFORM node:20-alpine3.20 AS alpine
# It's important to update the index before installing packages to ensure you're getting the latest versions.
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox ssl_client
-FROM alpine AS base
+FROM --platform=$BUILDPLATFORM alpine AS base
RUN npm install turbo@^1.13.3 --global
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
@@ -12,7 +12,7 @@ RUN corepack enable
RUN corepack prepare [email protected] --activate
-FROM base AS pruner
+FROM --platform=$BUILDPLATFORM base AS pruner
WORKDIR /app
@@ -20,7 +20,7 @@ COPY . .
RUN turbo prune --scope=web --docker
-FROM base AS builder
+FROM --platform=$BUILDPLATFORM base AS builder
WORKDIR /app
@@ -57,7 +57,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
RUN turbo run build --filter=web
# Production image, copy all the files and run next
-FROM base AS runner
+FROM --platform=$TARGETPLATFORM base AS runner
RUN apk add --no-cache dumb-init
diff --git a/worker/Dockerfile b/worker/Dockerfile
index 99299d6cca..c541b43b94 100644
--- a/worker/Dockerfile
+++ b/worker/Dockerfile
@@ -1,10 +1,10 @@
-FROM node:20-alpine3.20 AS alpine
+FROM --platform=$BUILDPLATFORM node:20-alpine3.20 AS alpine
# It's important to update the index before installing packages to ensure you're getting the latest versions.
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox ssl_client
-FROM alpine AS base
+FROM --platform=$BUILDPLATFORM alpine AS base
RUN npm install turbo@^1.13.3 --global
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
@@ -12,7 +12,7 @@ RUN corepack enable
RUN corepack prepare [email protected] --activate
-FROM base AS pruner
+FROM --platform=$BUILDPLATFORM base AS pruner
WORKDIR /app
@@ -21,7 +21,7 @@ RUN turbo prune --scope=worker --docker
-FROM base AS builder
+FROM --platform=$BUILDPLATFORM base AS builder
WORKDIR /app
@@ -45,7 +45,7 @@ RUN turbo run build --filter=worker...
-FROM base AS runner
+FROM --platform=$TARGETPLATFORM base AS runner
WORKDIR /app
@@ -61,4 +61,4 @@ COPY --from=builder --chown=expressjs:expressjs /app .
EXPOSE 3030
ENV PORT=3030
-CMD ["node", "worker/dist/index.js"]
\ No newline at end of file
+CMD ["node", "worker/dist/index.js"]