Skip to content

Commit

Permalink
Update Dockerfile to clear node_modules cache
Browse files Browse the repository at this point in the history
This commit updates the Dockerfile to clear the node_modules cache before running npm install and npm run build. This ensures that the latest dependencies are installed and the build process is up to date.
  • Loading branch information
walnuts1018 committed Jan 25, 2024
1 parent a1b434f commit d237b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY . .

ENV NEXT_TELEMETRY_DISABLED 1

RUN --mount=type=cache,target=/app/node_modules rm -rf node_modules
RUN --mount=type=cache,target=/app/node_modules rm -rf node_modules/*
RUN --mount=type=cache,target=/app/.next/cache --mount=type=cache,target=/app/node_modules --mount=type=cache,target=/root/.npm npm i && npm run build
# ---------------------------------------------------------------------------------------------------------------
# Production image, copy all the files and run next
Expand Down

0 comments on commit d237b90

Please sign in to comment.