Update docusaurus nodejs version.
This commit is contained in:
parent
76329996c9
commit
7f34007bbf
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user