Alpine Dockerfile Advantages of --no-cache Vs. rm /var/cache/apk/*

前端 未结 2 575
长情又很酷
长情又很酷 2021-01-30 06:31

When creating Dockerfiles using the Alpine image, I have often seen the use of the apk --no-cache and other times it is committed and instead I see rm /var/ca

2条回答
  •  庸人自扰
    2021-01-30 06:35

    I think this is a design style. The essence of cache is to reuse, for example, multiple containers can mount the same cached file system without repeatedly downloading it from the network.

    Can view the apline wiki: https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Local_Cache

提交回复
热议问题