| FROM node:20.11-alpine3.19 AS base | FROM node:20.11-alpine3.19 AS base | ||||
| LABEL maintainer="takatost@gmail.com" | LABEL maintainer="takatost@gmail.com" | ||||
| # if you located in China, you can use aliyun mirror to speed up | |||||
| # RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories | |||||
| RUN apk add --no-cache tzdata | RUN apk add --no-cache tzdata | ||||
| COPY package.json . | COPY package.json . | ||||
| COPY yarn.lock . | COPY yarn.lock . | ||||
| RUN yarn install --frozen-lockfile | |||||
| # if you located in China, you can use taobao registry to speed up | # if you located in China, you can use taobao registry to speed up | ||||
| # RUN yarn install --frozen-lockfile --registry https://registry.npm.taobao.org/ | |||||
| # RUN yarn install --frozen-lockfile --registry https://registry.npmmirror.com/ | |||||
| RUN yarn install --frozen-lockfile | |||||
| # build resources | # build resources | ||||
| FROM base as builder | FROM base as builder |