1
0
Fork 0
mirror of https://github.com/silenty4ng/k5web synced 2025-04-06 16:47:24 +00:00

Update Dockerfile

deploy static file into nginx image
This commit is contained in:
sysuid 2024-06-08 00:22:28 +08:00 committed by 奚玉帆
parent 78898a76bf
commit cf0e455007

View file

@ -1,4 +1,4 @@
FROM node:22
FROM node:22 AS build-yarn
WORKDIR /app
@ -8,6 +8,10 @@ RUN yarn install
COPY . .
EXPOSE 5173
RUN yarn build
CMD ["yarn", "dev", "--host", "0.0.0.0"]
FROM nginx:latest AS runtime
COPY dist/ /usr/share/nginx/html/
EXPOSE 80