Reputation: 6121
Suppose I have a python web app.
I can create docker file for installing all dependencies. But then (or before it if I have requirements for pip) I have like two different goals.
For deployment I can just download all source code from git through ssh or tarballs and it would work.
But for a developer machine it wouldn't work. I would need then work on actual source code. I know that I can 'mirror' any folder/files from host machine to docker container. So ok, I can then remove all source code, that was downloaded when image was built and 'mirror' current source code that exists in developer machine. But if developer machine don't have any source code downloaded with git clone, it wouldn't work. So what to do in that case? I mean except the obvious - clone all repos on developer machine and then 'mirror' it?
So what is the right way to use docker not only for deployment but for the development also?
Upvotes: 2
Views: 304
Reputation: 8695
Providing developer with a copy of repository to work with is not docker's responsibility. Many people do the other way - you put Dockerfile
or a script to pull (or build) and run your container into the sources of your project.
Upvotes: 1
Reputation: 101
In the development case I would just use docker's -v option to mount the current working copy into a well known location in the container and provide a small wrapper shell script that automates firing up the app in the container.
Upvotes: 0