Vagrant - Docker provider vs. docker provisioner

2019-02-06 01:56发布

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条回答
聊天终结者
2楼-- · 2019-02-06 02:26

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).

查看更多
登录 后发表回答