From f91ea2cc7567d8c0c741a1122d63725c449d0271 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Fri, 29 Dec 2023 11:16:42 -0500 Subject: [PATCH] 20846/18874: Update NodeJS/Yarn in debian12/ubuntu2204 This applies the change from c4d4088d3e7f3e3f896ed0bb482560ab702d5465 to the debian12 and ubuntu2204 package build Dockerfiles. It uses a slightly different yarn install recipe to avoid the "double ln" and associated layer, but the end result is the same. Refs #18874, #20846. These branches were in development in parallel, so the changes from the former weren't applied to the latter. Arvados-DCO-1.1-Signed-off-by: Brett Smith --- build/package-build-dockerfiles/debian12/Dockerfile | 10 ++++++---- build/package-build-dockerfiles/ubuntu2204/Dockerfile | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build/package-build-dockerfiles/debian12/Dockerfile b/build/package-build-dockerfiles/debian12/Dockerfile index 86d038b80b..0e8c8acf1e 100644 --- a/build/package-build-dockerfiles/debian12/Dockerfile +++ b/build/package-build-dockerfiles/debian12/Dockerfile @@ -13,8 +13,9 @@ ONBUILD ARG GOVERSION ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm -ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/ -ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/ +ONBUILD ADD generated/node-v12.22.12-linux-x64.tar.xz /usr/local/ +ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-x64/bin PATH="$PATH:." ./npm install -g yarn +ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-x64/bin/* /usr/local/bin/ # On x86, we want some cross-compilation support for arm64 # Add gcc-aarch64-linux-gnu to compile go binaries for arm64 ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y gcc-aarch64-linux-gnu @@ -28,8 +29,9 @@ ONBUILD ARG GOVERSION ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm -ONBUILD ADD generated/node-v10.23.1-linux-arm64.tar.xz /usr/local/ -ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-arm64/bin/* /usr/local/bin/ +ONBUILD ADD generated/node-v12.22.12-linux-arm64.tar.xz /usr/local/ +ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-arm64/bin PATH="$PATH:." ./npm install -g yarn +ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-arm64/bin/* /usr/local/bin/ FROM build_${HOSTTYPE} RUN echo HOSTTYPE ${HOSTTYPE} diff --git a/build/package-build-dockerfiles/ubuntu2204/Dockerfile b/build/package-build-dockerfiles/ubuntu2204/Dockerfile index b6c0a14ea9..6eae39c2ca 100644 --- a/build/package-build-dockerfiles/ubuntu2204/Dockerfile +++ b/build/package-build-dockerfiles/ubuntu2204/Dockerfile @@ -12,8 +12,9 @@ ONBUILD ARG GOVERSION ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm -ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/ -ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/ +ONBUILD ADD generated/node-v12.22.12-linux-x64.tar.xz /usr/local/ +ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-x64/bin PATH="$PATH:." ./npm install -g yarn +ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-x64/bin/* /usr/local/bin/ # On x86, we want some cross-compilation support for arm64 # Add gcc-aarch64-linux-gnu to compile go binaries for arm64 ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y gcc-aarch64-linux-gnu @@ -29,8 +30,9 @@ ONBUILD ARG GOVERSION ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm -ONBUILD ADD generated/node-v10.23.1-linux-arm64.tar.xz /usr/local/ -ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-arm64/bin/* /usr/local/bin/ +ONBUILD ADD generated/node-v12.22.12-linux-arm64.tar.xz /usr/local/ +ONBUILD RUN env -C /usr/local/node-v12.22.12-linux-arm64/bin PATH="$PATH:." ./npm install -g yarn +ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-arm64/bin/* /usr/local/bin/ FROM build_${HOSTTYPE} -- 2.30.2