VirusTotalNet
VirusTotalNet copied to clipboard
Stop using --no-cache with apk del
Expected Behaviour
We should not be using --no-cache with apk del.
Current Behaviour
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).
# 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
...
Possible Solution
Update Dockerfiles.
Steps to Reproduce (for bugs)
apk add curl --no-cacheapk del curl --no-cache --verbose
Context
Observed during review of php7 template.
Your Environment
Alpine
Approved