By far the biggest problem with software is that it has to be installed. This makes it difficult to transfer from one computer to another, and difficult if you need to reinstall the computer.
Docker does this differently, the program is installed into a container and that container can be copied to any computer and run on there.
Docker sees two parts of every container:
- The image is the software that is installed in the container
- The instance is the environment that the software is run in.
When a container is installed, often a local directory is passed to the image and some ports are made available so that it can be connected to remotely.
If you created a web server container, you’d want to pass the location of your website contents as well as the web port so people can access that data from the outside.
Docker differs from running Virtual Machines, they both follow the same isolation. However, Virtual Machines need more resources to run each Guest Operating System. Each container is standardised, secure and isolated from each other.