From da558e251885eb8c1f0232c770a603599d04f2c8 Mon Sep 17 00:00:00 2001 From: Marco Polichetti Date: Tue, 23 Jan 2024 18:27:25 +0100 Subject: [PATCH] =?UTF-8?q?chore(release):=20Fix=20npm=20installation=20?= =?UTF-8?q?=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workaround here: https://github.com/nodesource/distributions/issues/1601 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2074c1e..4073a16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -153,8 +153,11 @@ RUN \ if [ -n "$EXTENSIONS" ]; then \ install-php-extensions $EXTENSIONS; \ fi; \ - # Install Node.js, update npm and install Yarm mkdir -p /etc/apt/keyrings; \ + # Install Node.js, update npm and install Yarm + echo "Package: nodejs" >> /etc/apt/preferences.d/nodejs; \ + echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/nodejs; \ + echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/nodejs; \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \ apt-get update; \