Let's say you are a developer, and is writing a Java program.
You need
JDK, because this is where your Java compiler is.
You need
Java Runtimn, because it will run the
bytecode that your compiler will create.
You may need to run all of this on top of the specific O.S you want your program to run in.
Until recently, if you wanted to make sure that you have the same development environment as your target system (e.g the system you want to deploy), you would have to run a
virtual machine.
(I am mainly using VirtualBox from Oracle, but there are many other options for that.)
When you run a virtual machine, you are simulating a complete computer hardware, and you install a real operating system on top of it.
Why not use a good-old virtual machine?
Virtual machines use a lot of computer resources.
Some reasons for that:
We end up running the
O.S Kernel of the virtual machine
We may install all of the files that are needed for the virtual machine OS
WE NEED A LIGHTER SOLUTION that will allow us run a program within an environment of its own.
This is what containers are, as discussed in further posts.