Skip to content

⚡️(docker) build the frontend assets once on the native platform - #873

Merged
kernicPanel merged 1 commit into
mainfrom
ci/frontend-native-build
Oct 16, 2026
Merged

kernicPanel merged 1 commit into
mainfrom
ci/frontend-native-build

Conversation

@kernicPanel

Copy link
Copy Markdown
Collaborator

Purpose

The build-and-push-frontend job takes about 25 minutes. Most of it is
yarn install and yarn build running for arm64 under QEMU (~21 min).

Proposal

The build output is static files served by nginx, identical on every
architecture. Run the node stages on the runner platform and keep only the
nginx stage per architecture.

  • FROM --platform=$BUILDPLATFORM on the frontend-deps stage
  • Tested with a manual run on this branch: the job drops from 25 min
    to 4 min 20, the published amd64 and arm64 images serve the same files
    as before (only the Next.js build id differs)

@NathanVss NathanVss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Smart :)

The arm64 frontend image ran yarn install and build under QEMU, taking
about 20 minutes. The output is static files, so build them on the
runner platform and only keep the nginx stage per architecture.
@kernicPanel
kernicPanel force-pushed the ci/frontend-native-build branch from 4cd0a6e to 5331a06 Compare October 16, 2026 12:53
@sonarqubecloud

Copy link
Copy Markdown

@kernicPanel
kernicPanel merged commit 5331a06 into main Oct 16, 2026
33 checks passed
@kernicPanel
kernicPanel deleted the ci/frontend-native-build branch October 16, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants