diff --git a/Dockerfile.build-and-run b/Dockerfile.build-and-run index ca7fdf75..702bd47a 100644 --- a/Dockerfile.build-and-run +++ b/Dockerfile.build-and-run @@ -9,21 +9,12 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ apt-get update && \ apt-get install -y yarn xz-utils - -#根据架构安装构建web页面所需的node.js -RUN ARCH=$(uname -m) && \ - if [ $ARCH = 'x86_64' ]; then \ - NODE_ARCH='x64'; \ - elif [ $ARCH = 'aarch64' ]; then \ - NODE_ARCH='arm64'; \ - else \ - echo '不支持的架构: $ARCH'; \ - fi && \ - wget https://nodejs.org/dist/v18.20.3/node-v18.20.3-linux-${NODE_ARCH}.tar.xz && \ - tar Jxvf /build/node-v18.20.3-linux-${NODE_ARCH}.tar.xz && \ +#安装构建web页面所需的node.js +RUN wget https://nodejs.org/dist/v18.20.3/node-v18.20.3-linux-x64.tar.xz && \ + tar Jxvf /build/node-v18.20.3-linux-x64.tar.xz && \ rm -rf /usr/bin/node /usr/bin/npm && \ - ln -s /build/node-v18.20.3-linux-${NODE_ARCH}/bin/node /usr/bin/node && \ - ln -s /build/node-v18.20.3-linux-${NODE_ARCH}/bin/npm /usr/bin/npm + ln -s /build/node-v18.20.3-linux-x64/bin/node /usr/bin/node && \ + ln -s /build/node-v18.20.3-linux-x64/bin/npm /usr/bin/npm COPY . . diff --git a/test.sh b/test.sh deleted file mode 100644 index 689bafb4..00000000 --- a/test.sh +++ /dev/null @@ -1,13 +0,0 @@ -ARCH=$(uname -m) - -# 设置下载的URL -if [ "$ARCH" = "x86_64" ]; then - URL="https://nodejs.org/dist/latest/node-v14.17.3-linux-x64.tar.xz" -elif [ "$ARCH" = "aarch64" ]; then - URL="https://nodejs.org/dist/latest/node-v14.17.3-linux-arm64.tar.xz" -else - echo "不支持的架构: $ARCH" - exit 1 -fi - -echo $URL \ No newline at end of file