Running our first container
To validate Docker has been installed correctly, let's run our first container, hello-world is actually an image, an image is an immutable snapshot of a container. Once we start these with the following command they become containers, think of it like types and instances, a type defines fields and methods making up behavior. An instance is a living instantiation of this type, you can assign other types to the fields and call the methods to perform actions.
$ docker run --rm hello-world
The first thing you should see is:
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 Status: Downloaded newer image for hello-world:latest
When you execute a docker run
the first thing the engine does is check to see if you have the image installed locally. If it doesn't then it connects to the default registry, in this case, https://hub...