mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
Dockerfile: always use host platform for build stage
Compiled assets and JavaScript files can run on any platform. So always use host platform for build to eliminate emulation overhead. Note that BUILDPLATFORM is new and requires docker buildx. It falls back to amd64.
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
# secrets, uncommitted changes or other sensitive information. DO NOT
|
||||
# publish the result image unless it was composed in a clean environment.
|
||||
|
||||
ARG BUILDPLATFORM=amd64
|
||||
ARG NODE_IMAGE=node:alpine
|
||||
|
||||
FROM ${NODE_IMAGE} as nodebuild
|
||||
FROM --platform=$BUILDPLATFORM ${NODE_IMAGE} as nodebuild
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user