openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
280 stars 227 forks source link

Stop using --no-cache with apk del #78

Open johnmccabe opened 6 years ago

johnmccabe commented 6 years ago

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)

  1. apk add curl --no-cache
  2. apk del curl --no-cache --verbose

Context

Observed during review of php7 template.

Your Environment

Alpine

alexellis commented 6 years ago

Approved