Browse Source

更新 '16/Dockerfile'

main
凌文龙 2 years ago
parent
commit
c7fa3d5df9
  1. 7
      16/Dockerfile

7
16/Dockerfile

@ -2,7 +2,10 @@ FROM repository.anxinyun.cn/devops/alpine:3-tz-hw
ENV NODE_VERSION 16.14.2-r0 ENV NODE_VERSION 16.14.2-r0
RUN addgroup -g 1000 node; \ COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh; \
addgroup -g 1000 node; \
adduser -u 1000 -G node -s /bin/sh -D node; \ adduser -u 1000 -G node -s /bin/sh -D node; \
apk add --no-cache nodejs==${NODE_VERSION} npm yarn; \ apk add --no-cache nodejs==${NODE_VERSION} npm yarn; \
node --version; \ node --version; \
@ -12,8 +15,6 @@ RUN addgroup -g 1000 node; \
cp /root/.npmrc /home/node/ ; \ cp /root/.npmrc /home/node/ ; \
chown node:node /home/node/.npmrc chown node:node /home/node/.npmrc
COPY docker-entrypoint.sh /usr/local/bin/
USER node USER node
ENTRYPOINT ["docker-entrypoint.sh"] ENTRYPOINT ["docker-entrypoint.sh"]

Loading…
Cancel
Save