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

Random notes on cached esy + docker #1

Open
wokalski opened this issue Jul 1, 2020 · 3 comments
Open

Random notes on cached esy + docker #1

wokalski opened this issue Jul 1, 2020 · 3 comments

Comments

@wokalski
Copy link
Contributor

wokalski commented Jul 1, 2020

My goal here is to cache .esy separately from normal Docker layering but still be able to have a universal workflow where Docker works as customary both on CI and locally. I looked at --mount=type=cache - it is built for tools like esy or cargo. I posted some of my findings here:

actions/cache#260 (comment)

My biggest concerns are:

  1. Keeping the cache size constant (modulo change in size of dependency graph)
  2. Not corrupting Docker internal state
  3. Reducing constant factors (such as needlessly pruning everything with docker system prune)

I figured out how to prune everything except for the mount cache with docker builder prune:

DOCKER_BUILDKIT=1 docker builder prune --filter type=source.local --all
DOCKER_BUILDKIT=1 docker builder prune --filter type=regular --all

But it still doesn't tell us how to properly save the state and later restore it.

In the current exploration, we export the whole /var/lib/docker which has large constant factors and probably requires careful pruning but I'm not familiar with how it all works.

Alternatively, there's buildx which is properly supported and probably allows us to achieve the caching we want without resorting to any hacks but alas I'm not familiar with it either.

@wokalski
Copy link
Contributor Author

wokalski commented Jul 1, 2020

@wokalski
Copy link
Contributor Author

wokalski commented Jul 1, 2020

@wokalski
Copy link
Contributor Author

wokalski commented Jul 1, 2020

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

No branches or pull requests

1 participant