这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: use docker cache best practices in examples #1673

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

Merged
merged 6 commits into from
Aug 30, 2022

Conversation

HosseinAgha
Copy link
Contributor

@HosseinAgha HosseinAgha commented Aug 10, 2022

The whole purpose of the turbo prune --docker is to use docker caching best practices while the Docker examples do not follow these bests practices.

Plus, I believe that the first stage of the Dockerfile is wrong as it copies the whole project and defeats the entire purpose of the caching because the first layer never gets cached. I believe the most optimized solution is to run the turbo prune before the docker build on the machine that runs the docker build and set the out directory as the docker build context.

I understand that showing this approach may not be possible in the example, so I suggest we add a comment to the first stage with the above explanation.

@vercel
Copy link

vercel bot commented Aug 10, 2022

@HosseinAgha is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this and updating it!

@chris-olszewski chris-olszewski requested a review from a team as a code owner August 25, 2022 17:32
@vercel
Copy link

vercel bot commented Aug 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview Aug 30, 2022 at 10:42AM (UTC)
turborepo-5d4h ❌ Failed (Inspect) Aug 30, 2022 at 10:42AM (UTC)

@gsoltis gsoltis added the pr: automerge Kodiak will merge these automatically after checks pass label Aug 25, 2022
@vercel vercel bot temporarily deployed to Preview – turborepo-5d4h August 26, 2022 15:45 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants