Open johnmccabe opened 6 years ago
We should not be using --no-cache with apk del.
--no-cache
apk del
Most alpine based template Dockerfiles have --no-cache set which results in the APK index being downloaded when set (you can see this occur by setting the --verbose flag).
Dockerfile
# apk del nginx -v --no-cache fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz ...
Update Dockerfiles.
Dockerfiles
apk add curl --no-cache
apk del curl --no-cache --verbose
Observed during review of php7 template.
Alpine
Approved
Expected Behaviour
We should not be using
--no-cache
withapk del
.Current Behaviour
Most alpine based template
Dockerfile
s have--no-cache
set which results in the APK index being downloaded when set (you can see this occur by setting the --verbose flag).Possible Solution
Update
Dockerfiles
.Steps to Reproduce (for bugs)
apk add curl --no-cache
apk del curl --no-cache --verbose
Context
Observed during review of php7 template.
Your Environment
Alpine