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 .dockerignore ignoring the .cog directory we produce #1962

Open
wants to merge 2 commits into
base: main
Choose a base branch
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

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.

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