Running Containers From Images
Remember when we mentioned containers are built from images? The command
docker run <image> creates a container based on that image. One can say that a container is a running instance of an image. Another reminder is that this image could either be local or in the registry.
Go ahead and run the already created images
docker run python-docker and
docker run js-docker:
What do you notice? The containers run outputs to the terminal's respective lines. Notice that the command preceded by CMD in the Dockerfile is the one that runs:
docker build -t python-docker:test . and docker build -t js-docker:test .
Then, run the following: ...