Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant - Docker provider vs. docker provisioner

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?

like image 857
Zveratko Avatar asked May 22 '15 10:05

Zveratko


People also ask

What is Docker Provisioner?

Provisioner name: "docker" The Vagrant Docker provisioner can automatically install Docker, pull Docker containers, and configure certain containers to run on boot. The docker provisioner is ideal for organizations that are using Docker as a means to distribute things like their application or services.

Can I use Vagrant with Docker?

Vagrant comes with support out of the box for using Docker as a provider. This allows for your development environments to be backed by Docker containers rather than virtual machines. Additionally, it provides for a good workflow for developing Dockerfiles.

What is Docker provider?

The Docker provider is used to interact with Docker containers and images. It uses the Docker API to manage the lifecycle of Docker containers. Because the Docker provider uses the Docker API, it is immediately compatible not only with single server Docker but Swarm and any additional Docker-compatible API hosts.

What is Vagrant provisioning?

Provisioners in Vagrant allow you to automatically install software, alter configurations, and more on the machine as part of the vagrant up process. This is useful since boxes typically are not built perfectly for your use case.


Video Answer


1 Answers

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

like image 133
ISanych Avatar answered Oct 07 '22 17:10

ISanych