A
A
Alexey2014-12-13 13:45:16
Virtualization
Alexey, 2014-12-13 13:45:16

About Docker or the difference from a virtual machine and a bit about Vagrant...?

I would like to know what is the difference between Virtualbox(VMware) and Docker?
If I understand correctly, I can raise any OS here and there, for example, the same Ubuntu and LAMP.
The only difference is that I will have access to Docker immediately from bash, and to VB through its window or ssh, plus if I exit, everything will be saved in the virtual machine, but will everything die in Docker without a commit? Or are there other important differences...?
They write that Docker is actively used in programming and porting workstations. I mean, I can work with the code directly in the docker image, after commit, push, and then run it all on the server without installing dependencies?
Vagrant, as far as I understand, is actively used when creating images and configuring them?
And lastly, can I:
Run image in Linux, make changes in the code (by the way, how to do it, for example, in the same *storm, Sublime. ... ) and commit.
After entering Windows, run image and continue development there?

Thanks everyone for the replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2014-12-13
@azovl

Docker ~ lxc ~ cgroups = resource limiting system for process groups in linux = only "linux programs" can be run
Virtualbox(VMware) = virtualization systems = running a full OS

And how are things going with "voracity", for example image c LAMP vs native installation?
there are losses, but they cannot be compared with buns
And is it possible to raise 2 images from LAMP, is the conflict inevitable?
it is possible, but not on port 80, but on others, and put a proxy router in front of them in the form of another box with nginx on board

B
bamaz, 2016-05-18
@bamaz

I would like to know what is the difference between Virtualbox(VMware) and Docker?

Docker is a strong isolation of resources inside the Linux operating system.
No more. That is, the binary file is launched in the same OS, but does not have access outside the cell allocated to it . A program ( the only one, generally speaking , a program is supposed to be in Docker) can have its own dependencies, moreover, it is allowed to use a completely different version of Linux inside the Docker container .
But this is not virtualization. More precisely, you can call it isolation from the environment (settings) of the operating system. This is exactly what Docker is all about -so that you can run the program almost anywhere without configuring it for another OS (without installing libraries, without prescribing paths, ports, without creating configuration files, if possible, etc.).
This is done at the OS API level, therefore, it is not quite expensive in terms of performance . True, with illiterate use (when different images are used as ancestors in the image), it is unprofitable in terms of disk space consumption.
In particular, Docker can only run Linux from under Linux , and not any versions are suitable, only specially prepared (lightweight) can be in the Docker container . In other OS - Windows, MacOSX - Docker is implemented as a full-fledged virtual machine with Linux, therefore, it consumes a lot of resources.
VirtualBox is a true virtual machine , meaning it could actually have a completely different OS inside. Not only Linux . Complete isolation up to the emulation of hardware I/O ports. The isolation is tighter. But it requires a lot more resources.
Starting a virtual machine is a significant time investment. The best virtual machines bite off at least 15% of performance ....
Running a program in Docker is comparable to running a regular binary file inside a normal operating environment (to be precise, a little more, but not much).
With proper use, you can run at least hundreds of Docker containers on a typical home computer.
But running at least a few full-fledged virtual machines on the same hardware is unlikely to succeed.
Inside Docker - far from any. The choice is limited to a few specially prepared Linux distributions.
Inside Virtual Box - really any.
What you want and through Virtual Box is easily implemented using the Vagrant tool . There will be an illusion that you are working in Docker.
Plus, if I exit, then everything will be saved in the virtual machine, but in Docker everything will die without a commit? Or are there other important differences...?
What you mean - you can do it inside a full virtual machine - disable persistent saving to disks.
What you are writing about is just the concept of stateless containers. That is, inside everything is set up once and for all. All changes should be made by the Docker container only on mapped external devices. This guarantees a constant environment for the program inside the Docker container. Extremely important for repeatability in production. So that you don’t have to wake up at 3 in the morning and look for why your site with a million traffic has stopped working. Ah, this is because some software that has nothing to do with your program has been updated and pulled a library that is not compatible with the version that you are using.
No.
The concept of repetition is this.
You program and design and make up as usual.
You place the result of your work in a container - you debug it in a container . The same container
is used on the server . This guarantees some repeatability of the conditions under which debugging was carried out and under which everything will work in production. Well, or in more complex cases - send it for testing. Testing is done in a Docker container, then the artifacts are moved to another Docker container and sent to production. Although they can go into production right in the test container, right with the source code.
Since you can work in an environment incompatible with docker (for example, on Windows) and debugging is possible only through a virtual machine.
In production, no. Since there is too much overhead for the virtual machine.
And the last thing, can I:
Run image in Linux, make changes in the code (by the way, how to do it, for example, in the same *storm, Sublime. ... ) and commit.
After entering Windows, run image and continue development there?

I think so,
but that's not what Docker was designed for.
And writing code inside a virtual machine is possible. I do it myself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question