I'm deploying an nginx instance. The dockerfile as well as the nginx configuration data and web app live in my git repository. It seems to make sense to me that this is all one git repository: the application and how to deploy it. In Dockerfile I want to say (this is simplified a bit, but the point is that I can't)
COPY web-app /serving
COPY docker/site-conf /etc/nginx/sites-enabled/
where I have this directory structure:
my-git-root
web-app
...
docker
Dockerfile
build.sh
site-conf
The problem, at least in part, is that docker's context is my-git-root/docker/ .
In the spirit of immutable services, I would like the container to have a snapshot of the git repository rather than apt-get install'ing git in the container and pulling the data. But I don't see how to make this work unless I separate out docker stuff to a separate git repository, then git clone the web app on each build -- I'd rather not let anyone even be tempted to git pull in a live container.
Suggestions on a more sane workflow?