15 lines
470 B
Docker
15 lines
470 B
Docker
|
|
FROM node:lts-alpine
|
|
WORKDIR /app
|
|
RUN sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories
|
|
RUN apk add --no-cache tzdata
|
|
ENV TZ="Asia/Shanghai"
|
|
RUN npm config set registry https://registry.npm.taobao.org
|
|
COPY package.json ./package.json
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
RUN rm -rf node_modules && rm package-lock.json
|
|
RUN npm install --production
|
|
EXPOSE 3000
|
|
CMD ["npm", "run", "start"] |