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

fix(build): .dockerignore not picked up #3116

Merged
merged 2 commits into from
Jun 15, 2024
Merged

Conversation

bcvanmeurs
Copy link
Contributor

@bcvanmeurs bcvanmeurs commented Apr 18, 2024

#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

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.
Copy link

vercel bot commented Apr 18, 2024

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

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 6:38pm

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a 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: .
Copy link
Contributor

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

Copy link
Contributor Author

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.

@bcvanmeurs
Copy link
Contributor Author

@ishaan-jaff could you have a second look at this PR please?

@ishaan-jaff
Copy link
Contributor

merging this - will take care of issues that come up

@ishaan-jaff ishaan-jaff merged commit 54cf065 into BerriAI:main Jun 15, 2024
2 checks passed
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 this pull request may close these issues.

None yet

2 participants