Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix .dockerignore ignoring the .cog directory we produce #1962

Closed
wants to merge 2 commits into from

Conversation

8W9aG
Copy link
Contributor

@8W9aG 8W9aG commented Sep 20, 2024

  • Before the build process sanitise the .dockerignore file to make sure it doesn't contain the .cog folder.
  • Add an integration test that tests for this case.

Fixes: #1961

* Check the docker ignore for .cog and if it
exists remove it.
* Make sure we pass this case to prevent .cog
docker ignore from sending unusual error messages
Copy link
Contributor

@technillogue technillogue left a comment

Choose a reason for hiding this comment

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

what we really want is for the dockerignore to look like this:

.cog
!.cog/tmp/<current build id>

the one annoying thing about that is that it means the dockerignore will keep changing, which would add noise to diffs if committed to git. it would best if there was an --extra-dockerignore flag to docker build (or similar), but I don't think that exists

@nickstenning nickstenning deleted the fix-dockerignore-dot-cog branch February 11, 2025 10:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add .cog to a .dockerignore produces hard to debug states
3 participants