repo2docker
repo2docker copied to clipboard
Support ignoring paths from a repo by reading a .dockerignore file
Is there a means to exclude files of the git repository from the docker image?
The use case is that of a (private) repository including solution notebooks to an assignment.
I presume this could be achieved with a post-build or so, but simply asking if we could have a configuration thing to include e.g. directories from the build (as well as the .git folder I guess).
You can add .dockerignore file into the root of your repo. This file is used by docker for the same purpose as .gitignore file by git.
@dolfinus I don't think repo2docker respects .dockerignore files.
That's unfortunate. Without respecting .dockerignore repo2docker adds all the files from the repo folder into the docker image, including .git folder. This is messing up with the docker layer caching mechanism and also increasing the resulting image on every pushed commit
Yeah, I think adding .dockerignore support would be a good addition to repo2docker functionality. I'll retitle the issue.