From 7f34007bbfadefe2baa51af09f2d0249d884ec59 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Sat, 4 Nov 2023 23:49:03 +0800 Subject: [PATCH] Update docusaurus nodejs version. --- docusaurus.dockerfile | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/docusaurus.dockerfile b/docusaurus.dockerfile index 032dbac..5a8a7e6 100644 --- a/docusaurus.dockerfile +++ b/docusaurus.dockerfile @@ -5,21 +5,12 @@ RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \ apt-get update -RUN apt-get install -y --no-install-recommends vim curl software-properties-common gpg +RUN apt-get install -y --no-install-recommends vim curl software-properties-common gnupg ca-certificates +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +ENV NODE_MAJOR=20 +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -RUN add-apt-repository -y -r ppa:chris-lea/node.js &&\ - rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list &&\ - rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save - -ENV VERSION=node_19.x -ENV KEYRING=/usr/share/keyrings/nodesource.gpg -ENV DISTRO=jammy - -RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee "$KEYRING" >/dev/null -RUN gpg --no-default-keyring --keyring "$KEYRING" --list-keys -RUN chmod a+r /usr/share/keyrings/nodesource.gpg -RUN echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list -RUN echo "deb-src [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list RUN apt-get update && apt-get install nodejs ENV LANG C.UTF-8