Containerizing cloud-native applications using Docker
In this section, we will look at how to containerize a MicroProfile application. There are two key parts to containerizing anything: the first is the creation of an image, and the second is running that image. While Docker was not the first product to do containerization, it did popularize it in a way that developers and operators could understand. Cloud Foundry was a common early alternative that had similar concepts but hid them as internal implementation details rather than making them first-class concepts. With Docker, these two concepts were broken into two parts, exposed by the docker build
command used to create the image, and the docker run
command used to run the image. These concepts were further expanded to become standardized, meaning there are now multiple alternatives to docker build
and docker run
.
The container image
A container image is the container deployment artifact. A container image contains everything...