diff --git a/Dockerfile b/Dockerfile index 108976d01..cdfe87504 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,16 +6,13 @@ ENV PYTHONDONTWRITEBYTECODE=1 ENV DEBIAN-FRONTEND noninteractive ENV PYTHONUNBUFFERED=1 ENV PIP_NO_CACHE_DIR=1 - -# Pin nodesource repo for nodejs -# https://github.com/nodesource/distributions/issues/1579 -RUN echo "Package: nodejs" >> /etc/apt/preferences.d/nodesource && \ - echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/nodesource && \ - echo "Pin-Priority: 600" >> /etc/apt/preferences.d/nodesource +ENV NODE_MAJOR=16 RUN apt-get update && \ - apt-get install -y wget && \ - wget -O - https://deb.nodesource.com/setup_16.x | bash - && \ + apt-get install -y ca-certificates curl gnupg && \ + mkdir -p /etc/apt/keyrings && \ + 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_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ apt-get update && \ apt-get install -y \ gcc \