mirror of
https://github.com/tiennm99/caro.git
synced 2026-05-24 23:35:35 +00:00
f70c0eaa5f
docker build failed with "/public: not found" at the client stage. The client tree has never contained a public/ directory (vite doesn't need one for this project — index.html lives at the client root and vite.config.js has no publicDir override). Remove the dead COPY line. Verified: docker build -f client/Dockerfile client succeeds end-to-end.
17 lines
324 B
Docker
17 lines
324 B
Docker
# Build stage: Vite production build
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /build
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY index.html vite.config.js ./
|
|
COPY src src
|
|
RUN npm run build
|
|
|
|
# Runtime stage: nginx serves static assets
|
|
FROM nginx:alpine
|
|
COPY --from=build /build/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|