ft_transcendence/frontend/Dockerfile
Maieul BOYER 2ed524872b feat(docker): Multi stage docker now fetch deps once
Split dockerfile into three different dockerfiles such that dependencies
are only downloaded once

This allows the build to be a bit faster, since all deps are downloaded
once at the start.

This also makes it so the frontend container no longer needs to be ran,
as its files are directly embedded into the nginx container

This also remove the extra files, since bind mounts do work
it also remove the entrypoint.sh file, as you should prefer to not use
it
2025-12-30 19:02:07 +01:00

13 lines
268 B
Docker

FROM pnpm_base AS deps
COPY ./package.json ./pnpm-lock.yaml ./pnpm-workspace.yaml /src/
WORKDIR /src
RUN pnpm install -q --frozen-lockfile;
FROM pnpm_base AS builder
WORKDIR /src
COPY --from=deps /src/node_modules /src/node_modules
COPY . /src
RUN pnpm run build;