O'Reilly logo

Docker and Kubernetes for Java Developers by Jaroslaw Krochmalski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting

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, CMDor 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required