We should have a .dockerignore file to control what ends up in the app container (https://codefresh.io/docker-tutorial/not-ignore-dockerignore/).
The initial contents of this file is left to whoever picks up this issue! At a minimum it should include .git/