Is Docker a replacement for git source control? [c

2019-07-09 01:01发布

问题:

Is Docker in anyway intended to replace git, SVN or other similar source control platforms?

If not how do the two integrate?

回答1:

No, Docker is not intended to replace any of the SCM systems. When you build a versioned image, it means that you've just built an atomic version of the application inside a image that can then create containers... You will build it, from the source code obtained most probably from a repository.

More than that, Docker is working at symbiosis with git or other SCM system. You may want to keep the Dockerfile in the app repository besides other configuration files. You may also want to have the docker-compose.yml file in some repository alongside other custom deployment scripts or toolsets, etc.



回答2:

No, Docker is not intended as a replacement for git, SVN or similar.

The only relationship is that Docker Container/Images (I'm probably using the wrong term here, maybe someone can correct it) get created / changed in a way that has some similarities with a git commit history.

So you can start with some basic Unix container and than create two versions from that, one with an application server and one with a database.