Include .git subdirectory in Dockerfile to always include git-describe
Currently, Pod excludes the .git
subdirectory when building itself inside docker (via Dockerfile
and .dockerignore
). Just including the .git directory might not be desired because:
- it would include potentially sensitive information inside the docker layers during build. That might be OK though if we can guarantee that only the final stage of the multi-stage docker build gets published by default?
- it would force docker to re-build dockerized Pod if any git changes happen (even if no code changes happened)
Maybe it's worth researching best practices for dockerignore and git describe
first. If there's evidence that this problem is not really solvable, including .git
subdirectory might be considered..
┆Issue is synchronized with this Clickup task by Unito