Skip to content

Commit 731c5f4

Browse files
Remove redundant apk update calls in Dockerfile
Removed unnecessary `apk update` commands in Dockerfile. The apk add commands already utilize the `--no-cache` option, making the update step superfluous and ensuring the latest packages are used without maintaining a local cache. An additional `apk update` in another Docker image layer will increase the image size with no benefits.
1 parent 67efbb2 commit 731c5f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY package*.json ./
99
COPY patches ./
1010

1111
# Upgrade system packages
12-
RUN apk update && apk upgrade --no-cache
12+
RUN apk upgrade --no-cache
1313

1414
# Upgrade npm to version 10.9.2
1515
RUN npm install -g [email protected]
@@ -29,7 +29,7 @@ RUN npm run build \
2929
FROM node:20-alpine
3030

3131
# Upgrade system packages
32-
RUN apk update && apk upgrade --no-cache
32+
RUN apk upgrade --no-cache
3333

3434
# Upgrade npm to version 10.9.2
3535
RUN npm install -g [email protected]

0 commit comments

Comments
 (0)