Docker vs Vagrant

Every Docker image, as I understand it, is based on a base image - Ubuntu for example.

And if I want to isolate any process, I have to deploy the ubuntu docker base image ( where is the difference from Vagrant here? ), And create the required subimage after installing on the ubuntu image?

So if Ubuntu is running Vagrant and Docker, where is the difference in practice? And if you use a docker provider in Vagrant - where is the difference between Vagrant and Docker?

And, in Docker, is it possible to isolate processes on some PC without a base image without sharing it on another PC?

+3


source to share


2 answers


Vagrant is a utility that helps you automate the configuration of virtual machines. Docker is a utility that helps you use containerization on Linux.

A virtual machine runs an entire system and emulates hardware. Containers share processes in a single running kernel without emulating hardware.

Both VM and Docker images can be Ubuntu 14.04, but with Docker image, you don't need to run the entire OS.



For example, if I want to start an ubuntu based nginx container, I would only end the nginx process. No upstart / systemd / init is required. The VM will start the init system, manage its own network, and start other services. The container image approach that uses the linux base is mostly for convenience.

It is completely possible to run Docker containers with minimal images. A statically compiled, image-only binary is all you need to run the container.

+2


source


Vagrant : Vagrant is a project that helps spawn virtual machines. It started out as a command line VirtualBox, something akin to a Gemfile for a VM. You can choose a base image to start with, network, IP, folder sharing and put it all in a file that anyone can reuse to create the same customized machine. Vagrant has different extensions, service delivery options and VM providers. You can run VirtualBox, VMware, and it's extensible enough to create instances on EC2.



Docker: Docker, allows you to package an application with all its dependencies into a standardized unit of software development. Thus, it reduces friction between developer, QA, and testing. It dynamically changes your application, adding new capabilities every day, scaling services to quickly change problem areas. Docker puts itself in an excited place as the interface to PaaS is networking, discovery, and service, with applications not having to worry about the underlying infrastructure. Yes, theirs are still problems with a loader in production, but hopefully we will see a solution to these issues as the docker team and contributors are working hard on these issues. Since the Docker Volume driver allows third-party container data management solutions to provide data volumes for containers,that work with data such as databases, keystores, and other stateful applications.The latest version comes with much more flexibility, full orchestration, extended networking, secret management, and more. ... As you can see, retrace is like a volume plugin and provides advanced storage functionality. emccode / rexray We're finally starting to agree on more than just images and runtimes .

0


source







All Articles