As you have seen in the previous chapters, to spin-up the container from the image, we use the docker run command. The running container will have its own file system, networking stack, and isolated process tree separate from the host. As you will remember from Chapter 5, Creating Images with Java Applications, every single docker run command creates a new container and executes a command specified in the Dockerfile, CMD, or ENTRYPOINT.
The syntax of the docker run command is as follows:
$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]
The command takes the image name, with the optional TAG or DIGEST. If you skip the TAG and DIGEST command parameters, Docker will run the container based on the image tagged latest. The ...