Building an image

In the previous section, we pushed the copy of the Postgres Docker image to a Docker Hub registry. Usually, we push our own images created from the file  Dockerfile, which defines all the instructions required when installing and configuring software on the container. The details related to the structure of Dockerfile will be discussed later. What is important for now, though, is the command used for building a Docker image,  docker build. This command should be run in the same directory where Dockerfile is located. When building a new image it is recommended to set its name and tag using the -t option. The following command creates the image piomin/order-service , tagged with a 1.0 version. The image may be pushed to your ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.