Skip to content
Snippets Groups Projects
Dockerfile 587 B
Newer Older
FROM node:16-alpine

# install node_modules outside app root in container so local development won't run into a problem of bind-mounting over it with local source code
COPY ["package.json", "package-lock.json", "./"]
RUN npm install
# ensures that exactly these executables (from the node_modules folder) are used instead of any other executables which might also be installed on the system inside the Docker image
ENV PATH=/usr/src/node_modules/.bin:$PATH

WORKDIR /usr/src/app
Martin Korec's avatar
Martin Korec committed
COPY prisma/schema.prisma ./prisma/
RUN npx prisma generate