diff --git a/16/Dockerfile b/16/Dockerfile index 7682f7f..c682e92 100644 --- a/16/Dockerfile +++ b/16/Dockerfile @@ -1,28 +1,13 @@ -FROM repository.anxinyun.cn/devops/alpine:3-tz-hw +FROM node:16-alpine3.15 -ENV NODE_VERSION=16.15.1 - -ARG ARCH="x64" - -ARG NODE_BINARY="node-v$NODE_VERSION-linux-$ARCH-musl" - -COPY "${NODE_BINARY}.tar.xz" /tmp - -RUN addgroup -g 1000 node; \ - adduser -u 1000 -G node -s /bin/sh -D node; \ - set -eu; \ - apk add --no-cache libstdc++ ; \ - # 网络问题不能直接下载,手动下载 - # wget "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/${NODE_BINARY}.tar.xz" -P /tmp ; \ - tar -xJf "/tmp/${NODE_BINARY}.tar.xz" -C /usr/local --strip-components=1 --no-same-owner ; \ - ln -s /usr/local/bin/node /usr/local/bin/nodejs; \ - rm -f "/tmp/${NODE_BINARY}.tar.xz"; \ - node --version; \ - npm --version; \ +RUN set -eu; \ + sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories; \ + apk add --no-cache tzdata \ + && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && echo "Asia/Shanghai" > /etc/timezone \ + && apk del tzdata; \ npm config set registry https://registry.npm.taobao.org; \ - cp /root/.npmrc /home/node/ ; \ + cp /root/.npmrc /home/node; \ chown node:node /home/node/.npmrc USER node - -CMD [ "node" ] \ No newline at end of file diff --git a/16/node-v16.15.1-linux-x64-musl.tar.xz b/16/node-v16.15.1-linux-x64-musl.tar.xz deleted file mode 100644 index 94b8fc2..0000000 Binary files a/16/node-v16.15.1-linux-x64-musl.tar.xz and /dev/null differ