Project

General

Profile

Feature #5980

Ability to Default to --no-cache

Added by Noah Nordrum almost 3 years ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Assignee:
Target version:
-
Start date:
07/28/2016
Due date:
% Done:

0%

Estimated time:

Description

Given that

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
  • /etc/apkrc
  • 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.


Related issues

Related to Alpine Package Keeper - Feature #8161: Don't use cached items if --no-cache is specified and proxy is usedClosed11/16/2017

History

#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.

#2 Updated by Timo Teräs over 1 year ago

  • Related to Feature #8161: Don't use cached items if --no-cache is specified and proxy is used added

Also available in: Atom PDF