Skip to content

Commit

Permalink
Simplify apk process in Dockerfile by using --no-cache option (#42)
Browse files Browse the repository at this point in the history
- Replace the `--update` parameter with `--no-cache` in `apk add`
commands to ensure package indices are updated without leaving a cache.
- Remove the explicit cache removal step since the `--no-cache`
parameter makes it superfluous.
  • Loading branch information
PeterDaveHello committed Apr 9, 2024
1 parent 2d09d92 commit c644109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG APP_PATH=/app
WORKDIR $APP_PATH

RUN npm install -g pnpm
RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
RUN apk add --no-cache python3 make g++

COPY package.json $APP_PATH/package.json
COPY pnpm-lock.yaml $APP_PATH/pnpm-lock.yaml
Expand All @@ -22,7 +22,7 @@ ARG APP_PATH=/app
WORKDIR $APP_PATH

RUN npm install -g pnpm
RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
RUN apk add --no-cache python3 make g++

COPY --from=base $APP_PATH/packages/server/dist ./dist
COPY --from=base $APP_PATH/packages/server/mongoose ./mongoose
Expand Down

0 comments on commit c644109

Please sign in to comment.