mirror of
https://github.com/PlayEdu/backend
synced 2025-06-06 14:54:05 +08:00
优化docker编译
This commit is contained in:
parent
e57ef9ce46
commit
016f5b4a70
12
Dockerfile
12
Dockerfile
@ -1,5 +1,13 @@
|
||||
FROM node:lts-slim as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN yarn config set registry https://registry.npm.taobao.org && yarn && yarn build
|
||||
|
||||
FROM nginx:1.23.4-alpine-slim
|
||||
|
||||
COPY dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=builder /app/docker/nginx.conf /etc/nginx/nginx.conf
|
Loading…
x
Reference in New Issue
Block a user