Optimize Dockerfile apk usage to reduce image size (#162)

Eliminate `apk update` command and explicitly use `apk upgrade` with
`--no-cache` to minimize temp file residue.
This commit is contained in:
Peter Dave Hello
2024-02-27 20:38:01 +01:00
committed by GitHub
parent 9222cef5a9
commit 0b82345ee9
+1 -1
View File
@@ -5,7 +5,7 @@ FROM php:8.0.5-fpm-alpine
WORKDIR /var/www/html WORKDIR /var/www/html
# Update packages # Update packages
RUN apk update && apk upgrade RUN apk upgrade --no-cache
# Install SQLite3 and its dependencies # Install SQLite3 and its dependencies
RUN apk add --no-cache sqlite-dev \ RUN apk add --no-cache sqlite-dev \