Ability to Default to --no-cache
docker --no-cache add curl
would be best practice in a docker container (I assume), it would be nice if there was a mechanism to change that default. I can think of a number of ways:
- compile flag
- separate apk-tools package
- environment variable that is always added to the command line like APK_OPTIONS that could be set to --no-cache in the alpine base image
or you could just tell me to keep using in my root container :)
alias apk="apk --no-cache"
I know it seems I'm being super lazy, but I think it's best to provide best practices as the default options and then let people deviate if they choose.
#1 Updated by Timo Teräs over 1 year ago
- Assignee set to Timo Teräs
I am not sure why docker instructs to use `--no-cache`. Perhaps adding '/etc/apk/defaults' or '/etc/apk/rc' would work for place to store options. We now have few option defaults that can be set via just creating a file entry, but that's not really scalable. However, doing this properly is not trivial because of '--root' option that can specify rootfs to modify... Need to think a bit more.