Closed tduffield closed 4 years ago
Thank you for the PR!
I'm not sure if adding .git
is technically safe. If someone is building an image that includes .git
this will incorrectly prevent the image from re-building.
I thought there was somewhere that dobi
read the .dockerignore
file and used that list of excludes, but I'm not seeing it now. I will need to have another look. I think using a file like .dockerignore
to exclude it might be the right approach.
Okay, let me see if that works.
So the .dockerignore
file is read in as part of the buildImage
function in build.go
, after we have determined whether or not the image is stale. It might be possible to read in the contents of .dockerignore
earlier to identify what should be ignored in determining staleness. Is that safer?
Closing in favor of #181
There are other directories in the root of a project that we'd want to ignore other than .dobi. Eventually it might make sense to make this configurable via a meta parameter.
Closes #179.