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

Optimize registry building #57

Closed
ErikSchierboom opened this issue Sep 28, 2022 · 3 comments
Closed

Optimize registry building #57

ErikSchierboom opened this issue Sep 28, 2022 · 3 comments

Comments

@ErikSchierboom
Copy link
Member

The docker image contains a registry of the top X crates. The way it is currently setup, the registry is rebuilt every time there is a build/deploy. That might be a bit overkill, and it is slightly annoying when working locally.

One option to fix this would be to use cache buster argument, and then pass some semi-stable value to it each time the image is built (e.g. causing the registry to only be built once a day). We use this pattern in the website. See https://github.com/exercism/website/blob/main/docker/rails.Dockerfile#L4 and https://github.com/exercism/website/blob/cb1b829bbe232e94bc593946fb00cacb2ee9f6f8/.github/workflows/deploy.yml#L78

@senekor
Copy link
Contributor

senekor commented Jul 17, 2023

I think this is related to #37 #40. If the supported crates are pinned to specific versions, we could use a hash over the supported_crates file as a cache buster. I might try to pick up the work on the stale PR when I get the time.

@senekor
Copy link
Contributor

senekor commented Jul 24, 2023

@ErikSchierboom I cannot reproduce this locally. When I simply run docker build . twice in a row, the second build is fully cached. Is this not a problem anymore or do I need to do something else to reproduce this?

@ErikSchierboom
Copy link
Member Author

@senekor Great, then the most recent version of the Dockerfile is likely fine!

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

2 participants