Commit yarn 4 in the tree and install with --immutable (closes #149)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Follows sneak's ruling at #149 (comment). This repository now carries yarn 4.18.1 under .yarn/releases. The distribution's yarn only starts that file, and that file does the work. yarn.lock is converted once, and script/bootstrap installs with --immutable instead of stopping on yarn's major version. Node is the distribution's newest Node package: nodejs-current on Alpine and nodejs_latest on nix. Every Dockerfile stage that needs yarn also copies .yarnrc.yml and .yarn/releases/. The policies and both checklists say so, with the steps for converting and for a new repository. Model: opus-5-5
This commit is contained in:
+12
-7
@@ -6,17 +6,20 @@
|
||||
# system packages. script/ passes a new value on every build. That value
|
||||
# reruns every RUN step below the ARG line, and the install step keeps
|
||||
# its layer. node and yarn come from the distribution, which is trusted,
|
||||
# so they need no version and no hash.
|
||||
# so they need no version and no hash. That yarn only starts the release
|
||||
# file in .yarn/releases/, so every stage copies that file and
|
||||
# .yarnrc.yml before it runs script/bootstrap.
|
||||
#
|
||||
# alpine 3.24.3, 2026-11-04
|
||||
FROM alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a AS lint
|
||||
RUN apk add --no-cache git make nodejs yarn
|
||||
RUN apk add --no-cache git make nodejs-current yarn
|
||||
ARG CACHEBUST
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY script/ script/
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn/releases/ .yarn/releases/
|
||||
RUN script/bootstrap
|
||||
|
||||
COPY . .
|
||||
@@ -27,13 +30,14 @@ RUN yarn run prettier --check '**/*.md' --tab-width 4 --prose-wrap always
|
||||
#
|
||||
# alpine 3.24.3, 2026-11-04
|
||||
FROM alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a AS test
|
||||
RUN apk add --no-cache git make nodejs yarn
|
||||
RUN apk add --no-cache git make nodejs-current yarn
|
||||
ARG CACHEBUST
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY script/ script/
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn/releases/ .yarn/releases/
|
||||
RUN script/bootstrap
|
||||
|
||||
COPY . .
|
||||
@@ -48,7 +52,7 @@ RUN echo "No tests defined."
|
||||
#
|
||||
# alpine 3.24.3, 2026-11-04
|
||||
FROM alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a
|
||||
RUN apk add --no-cache git make nodejs yarn
|
||||
RUN apk add --no-cache git make nodejs-current yarn
|
||||
ARG CACHEBUST
|
||||
|
||||
WORKDIR /app
|
||||
@@ -59,7 +63,8 @@ COPY --from=test /app/package.json /dev/null
|
||||
# script/bootstrap finds the system packages above and installs the node
|
||||
# packages.
|
||||
COPY script/ script/
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn/releases/ .yarn/releases/
|
||||
RUN script/bootstrap
|
||||
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user