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

[improvement]: Improve the docker build speed by using the buildkit cache mount #402

Closed
Zheaoli opened this issue Sep 11, 2022 · 1 comment · Fixed by #403
Closed

[improvement]: Improve the docker build speed by using the buildkit cache mount #402

Zheaoli opened this issue Sep 11, 2022 · 1 comment · Fixed by #403

Comments

@Zheaoli
Copy link
Collaborator

Zheaoli commented Sep 11, 2022

1~3 main use cases of the proposed improvement

For now, we will install all the packages whenever we build the docker image. But we should notice that the dependency change is much less than the code change; this means that most packages can be reused by caching.

I have made a PR #401 to cache the system package install result. After #401, we can use the buildkit cache mount to cache the pnpm package data. FYI https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#run---mounttypecache

After the optimisation, I think we can make the single image build time from more one and half minutes to a few seconds

Ideas for solution

No response

what types of users can benefit from using your proposed improvement

No response

Additional context

No response

@Zheaoli
Copy link
Collaborator Author

Zheaoli commented Sep 11, 2022

Alright, https://pnpm.io/cli/fetch may help us

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 a pull request may close this issue.

1 participant