Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use apk --no-cache' instead of --update' #15

Merged
merged 1 commit into from
Jun 5, 2016
Merged

Use apk --no-cache' instead of --update' #15

merged 1 commit into from
Jun 5, 2016

Conversation

mcornella
Copy link
Contributor

This avoids the need to do rm -rf /var/cache/apk. Needs alpine ≥ 3.3.
See https://github.com/gliderlabs/docker-alpine/blob/f93486d/docs/usage.md#disabling-cache

Here's an example diff between running apk --no-cache add tar and apk --update add tar:

$ diff <(docker diff e1ce7fc8b230 | sort) <(docker diff 4f4bb52532e5 | sort)         
3a4,5
> A /var/cache/apk/APKINDEX.5a59b88b.tar.gz
> A /var/cache/apk/APKINDEX.7c1f02d6.tar.gz
16a19,21
> C /var
> C /var/cache
> C /var/cache/apk

Thanks so much, you rock! 😄

@jessfraz
Copy link
Owner

jessfraz commented Jun 5, 2016

Thanks ya some of mine in my dockerfiles repo do this and some don't because of when they were written, if you get bored :)

@jessfraz jessfraz merged commit 38ab6be into jessfraz:master Jun 5, 2016
@mcornella mcornella deleted the patch-1 branch June 5, 2016 13:04
@mcornella
Copy link
Contributor Author

yayyy

Thanks ya some of mine in my dockerfiles repo do this and some don't because of when they were written, if you get bored :)

Yep, I've seen your dockerfiles, for once. If you don't mind losing the docker layer reuse optimization, I'll gladly fix some of those.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants