I was taking a look at Docker for Windows. It’s difficult to explain what Docker is if you haven’t seen it before. I tend to think of Docker as a mechanism that’s somewhat similar to running a virtual Linux machine on your physical Windows machine with a VHD (virtual hard drive) file.
However, Docker is much more sophisticated and instead of loading an entire virtual machine, you load only a stripped down “image” and run it as a “container”.
First I installed Docker for Windows on my Windows 10 machine. Docker starts running in the background immediately after installation. Then I launched an CMD shell and issued the command:
docker run -it ubuntu:16.04
which loosely means, “find the image for v 16.04 of Ubuntu Linux and start it in interactive terminal mode.”
Because I hadn’t downloaded the image before, Docker reached out on the Internet to Docker Hub (a huge collection of images) and fetched the image and started a container. In effect I was running Ubuntu.
From the Ubuntu prompt, I issued an echo command (print a message) and an ls (list directory contents) command. I exited Ubuntu.
The docker ps command showed all running containers (I only had one) and the docker images command showed the Ubuntu image.
Off screen I stopped the container by issuing a docker stop mad_shockley command and then force-removed the image by docker rmi ubuntu:16.04 -f.
Docker is very, very complicated but very, very interesting.