You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
369 B
Docker

FROM node:20 as builder
WORKDIR /app
RUN npm install -g pnpm@8
COPY . .
RUN pnpm install && pnpm build
# See https://lipanski.com/posts/smallest-docker-image-static-website
FROM busybox:1.36
RUN adduser -D static
USER static
WORKDIR /home/static
COPY --from=builder /app/public .
# Run BusyBox httpd
EXPOSE 3000
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]