16
All checks were successful
ci / docker (push) Successful in 55s

This commit is contained in:
2025-11-06 21:52:53 +01:00
parent 27a9353866
commit b51cb95af5

View File

@@ -14,13 +14,14 @@ ENV NODE_ENV production
WORKDIR /usr/src/app
COPY package.json .
COPY package-lock.json .
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.npm to speed up subsequent builds.
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into
# into this layer.
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev
# Run the application as a non-root user.