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; \