-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(build): .dockerignore not picked up #3116
Conversation
Using the git context of the build-push-action ignores the .dockerignore because it is pulled by buildkit. Instead use checkout action and use the path context.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need the context to pin to a commit hash
@@ -165,7 +171,7 @@ jobs: | |||
- name: Build and push Database Docker image | |||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |||
with: | |||
context: https://github.com/BerriAI/litellm.git#${{ github.event.inputs.commit_hash}} | |||
context: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would break our releases - we need the context to pin to a commit hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah of course!
I added the commit hash input to the checkout step. I think this should be equivalent, but it is hard to test without actually running it.
@ishaan-jaff could you have a second look at this PR please? |
merging this - will take care of issues that come up |
#2982 did not solve the issue, the files are still in the image builds.
Did some more research and found out that using the git context of the build-push-action ignores the .dockerignore because it is pulled by buildkit. Instead it is recommended to use the checkout action together with the path context.
See https://github.com/docker/build-push-action?tab=readme-ov-file#git-context and https://github.com/docker/build-push-action?tab=readme-ov-file#path-context.
Also see docker/build-push-action#655