From d1d4e45fb1a07d3d2e9cafeb54b62c5290fb52f4 Mon Sep 17 00:00:00 2001 From: Julien Castets Date: Fri, 19 Jul 2024 15:51:40 +0200 Subject: [PATCH] dockerfile: pin node version node:22 has been released yesterday and it is broken. With node 22, after `npm install`, the directory ./node_modules/.bin is empty, and you should call `npm install` twice. Instead, pinning to a working version of the node image works. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0901df4..ad07385 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ # # Javascript builder for static files # -FROM node AS node-builder +FROM node:20 AS node-builder WORKDIR /app COPY package.json package-lock.json /app/ + RUN npm install # @@ -88,4 +89,4 @@ CMD python manage.py makemigrations && python manage.py migrate && \ --limit-post=24000000 \ --http-manage-expect \ --ignore-sigpipe --ignore-write-errors --disable-write-exception \ - --cron='0 -1 -1 -1 -1 poetry run python /app/manage.py runcrons' + --cron='0 -1 -1 -1 -1 poetry run python /app/manage.py runcrons' \ No newline at end of file