microduck-simulator / Dockerfile
tfrere's picture
tfrere HF Staff
feat: Vite+React+MUI+R3F app shell in app/ (framework-agnostic game core, zustand bridge)
3570fe8
Raw
History Blame Contribute Delete
482 Bytes
# Build the Vite app, then serve the static bundle with nginx.
# HF Spaces docker SDK: the container must listen on app_port (8080);
# nginx-unprivileged listens on 8080 by default and runs as non-root,
# which is exactly what Spaces expects.
FROM node:22-alpine AS build
WORKDIR /build
COPY app/package.json app/package-lock.json ./
RUN npm ci
COPY app/ ./
RUN npm run build
FROM nginxinc/nginx-unprivileged:alpine
COPY --from=build /build/dist /usr/share/nginx/html
EXPOSE 8080