diff --git a/templates/Dockerfile.node b/templates/Dockerfile.node index befd569..b967f5e 100644 --- a/templates/Dockerfile.node +++ b/templates/Dockerfile.node @@ -19,6 +19,10 @@ RUN yarn build FROM node:22-alpine WORKDIR /app +# Keep Corepack's Yarn download in the image (world-readable) rather than in +# root's $HOME, so a `yarn ...` CMD starts as uid 1000 without fetching Yarn +# from repo.yarnpkg.com on every pod start. +ENV COREPACK_HOME=/usr/local/share/corepack # tzdata is only needed if the app sets TZ. Add `git` here if the app shells # out to it. RUN apk add --no-cache tzdata \