Vagrant - Docker provider vs. docker provisioner

人盡茶涼 提交于 2019-11-29 06:17:04

问题


Can anybody explain to me the difference?

Provisioner - is something doing provision - in docker installing, running, pulling containers.

Provider - is something that runs the VM. I.e. VBox runs the ubuntu OS image.

How can be Docker a provider? It runs directly some docker image? If I'm on windows there must some hidden usage of boot2docker right? When will I use each one?


回答1:


Docker provisioner help to prepare environment: build and pull images, run containers if you need multiple containers running for your vagrant machine. Docker provider is running vagrant machine in docker container (instead of VM/cloud as other providers do).

On Linux vagrant is using docker from the host OS. On Windows and MacOS X boot2docker is used for both docker provisioner and provider. By default all vagrant docker machines are using the same boot2docker instance - but you could configure which VM to use (It does not need to be boot2docker - any Linux with docker is ok).



来源:https://stackoverflow.com/questions/30394707/vagrant-docker-provider-vs-docker-provisioner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!