Skip to content

Commit a3e69e6

Browse files
committed
Make platform independent build stages run only once
1 parent 4980290 commit a3e69e6

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docker/alpine.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM node:22-alpine AS node-build
1+
# Run on the native build platform, the JS/CSS output is architecture-independent.
2+
FROM --platform=$BUILDPLATFORM node:22-alpine AS node-build
23
WORKDIR /etc/linkding
34
# install build dependencies
45
COPY rollup.config.mjs postcss.config.js package.json package-lock.json ./
@@ -85,7 +86,8 @@ CMD curl -f http://localhost:${LD_SERVER_PORT:-9090}/${LD_CONTEXT_PATH}health ||
8586
CMD ["./bootstrap.sh"]
8687

8788

88-
FROM node:22-alpine AS ublock-build
89+
# Run on the native build platform, the downloaded extension is architecture-independent
90+
FROM --platform=$BUILDPLATFORM node:22-alpine AS ublock-build
8991
WORKDIR /etc/linkding
9092
COPY scripts/setup-ublock.sh .
9193
# Install necessary tools

docker/default.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM node:22-alpine AS node-build
1+
# Run on the native build platform, the JS/CSS output is architecture-independent.
2+
FROM --platform=$BUILDPLATFORM node:22-alpine AS node-build
23
WORKDIR /etc/linkding
34
# install build dependencies
45
COPY rollup.config.mjs postcss.config.js package.json package-lock.json ./
@@ -80,7 +81,8 @@ CMD curl -f http://localhost:${LD_SERVER_PORT:-9090}/${LD_CONTEXT_PATH}health ||
8081
CMD ["./bootstrap.sh"]
8182

8283

83-
FROM node:22-alpine AS ublock-build
84+
# Run on the native build platform, the downloaded extension is architecture-independent
85+
FROM --platform=$BUILDPLATFORM node:22-alpine AS ublock-build
8486
WORKDIR /etc/linkding
8587
COPY scripts/setup-ublock.sh .
8688
# Install necessary tools

0 commit comments

Comments
 (0)