Think of a container like a self contained box that can be configured to contain everything a program may need to run.
You can give the box to someone else, and they can use it on their computer without any issues.
So I could build a container that contains my program that hosts cat pictures and give it to you. As long as you have docker installed you can run a command “docker run container X” and it’ll run.
VirtualBox: A virtual machine created with VirtualBox contains simulated hardware, an installed OS, and installed applications. If you want multiple VMs, you need to simulate all of that for each.
Docker containers virtualize the application, but use their host’s hardware and kernel without simulating it. This makes containers smaller and lighter.
VMs are good if you care about the hardware and the OS, for example to create different testing environments. Containers are good if you want to run many in parallel, for example to provide services on a server. Because they are lightweight, it’s also easy to share containers. You can choose from a wide range of preconfigured containers, and directly use them or customize them to your liking.
Can someone please explain me like i am 5 what is docker and containers ? How it works? Can i run anything on it ? Is it like virtualbox ?
Think of a container like a self contained box that can be configured to contain everything a program may need to run.
You can give the box to someone else, and they can use it on their computer without any issues.
So I could build a container that contains my program that hosts cat pictures and give it to you. As long as you have docker installed you can run a command “docker run container X” and it’ll run.
Well, I wasn’t the one asking, but I learned from that nonetheless. Thank you!
VirtualBox: A virtual machine created with VirtualBox contains simulated hardware, an installed OS, and installed applications. If you want multiple VMs, you need to simulate all of that for each.
Docker containers virtualize the application, but use their host’s hardware and kernel without simulating it. This makes containers smaller and lighter.
VMs are good if you care about the hardware and the OS, for example to create different testing environments. Containers are good if you want to run many in parallel, for example to provide services on a server. Because they are lightweight, it’s also easy to share containers. You can choose from a wide range of preconfigured containers, and directly use them or customize them to your liking.