el.xwx.moe/Dockerfile
Mathias Petermann 3eb273c25e
Use official nodejs base image, slim down image
- Playwright 1.35 supports debian 11 (bullseye), for debian 12 (bookworm) support, playwright needs to be updated
- Ensure all apt & yarn caches are cleaned in the same step they are used (slims down image)
- Image uses a lot less steps now, and slimmed down form ~4GB to 2.5GB
2023-09-20 08:19:52 +02:00

23 lines
393 B
Docker

# playwright doesnt support debian image
FROM node:20-bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN mkdir /data
WORKDIR /data
COPY ./package.json ./yarn.lock ./playwright.config.ts ./
RUN yarn && \
npx playwright install-deps && \
apt-get clean && \
yarn cache clean
COPY . .
RUN yarn prisma generate && \
yarn build
CMD yarn prisma migrate deploy && yarn start