Microservices deployment with Docker deals with three parts:
Application packaging, for example, JAR
Building Docker image with a JAR and dependencies using a Docker instruction file, the Dockerfile, and command docker build. It helps to repeatedly create the image
Docker container execution from this newly built image using command docker run
The preceding information will help you to understand the basics of Docker. You will learn more about Docker and its practical usage in Chapter 5, Deployment and Testing. Source and reference, refer to: https://docs.docker.com.