Skip to content

Commit 697694b

Browse files
authored
Merge pull request #301 from plone/frontend-image-lockfile
Pin frontend package versions in image build
2 parents 5990efb + 3b81402 commit 697694b

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

news/+pnpm-lock.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In the frontend image, use the same pnpm-lock.yaml that was used during development. @davisagli

templates/add-ons/seven_addon/{{ cookiecutter.__folder_name }}/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ COPY --chown=node Makefile /app/Makefile
88
COPY --chown=node pnpm-workspace.yaml /app/pnpm-workspace.yaml
99
COPY --chown=node .pnpmfile.cjs /app/.pnpmfile.cjs
1010
COPY --chown=node package.json /app/package.json.temp
11+
COPY --chown=node pnpm-lock.yaml /app/pnpm-lock.yaml
1112

1213
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT
1314
set -e
14-
python3 -c "import json; data = json.load(open('package.json.temp')); deps = data['dependencies']; data['dependencies'].update(deps); json.dump(data, open('package.json', 'w'), indent=2)"
15+
python3 -c "import json; orig_data = json.load(open('package.json.temp')); orig_deps = orig_data['dependencies']; data = json.load(open('package.json')); data['dependencies'].update(orig_deps); json.dump(data, open('package.json', 'w'), indent=2)"
1516
rm package.json.temp
1617
(cd core && git fetch --depth 1 origin seven:seven && git checkout seven)
1718
pnpm install && make build-deps

templates/sub/project_settings/{{ cookiecutter.__folder_name }}/frontend/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ COPY --chown=node volto.config.js /app/
77
COPY --chown=node package.json /app/package.json.temp
88
COPY --chown=node mrs.developer.json /app/
99
COPY --chown=node pnpm-workspace.yaml /app/
10+
COPY --chown=node pnpm-lock.yaml /app/pnpm-lock.yaml
1011

1112
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT
1213
set -e

0 commit comments

Comments
 (0)