Managing Docker images – Creating and Managing Container Images-2
Images comprise multiple layers, and most of the time, there is a relationship between various versions of containers that run on your server. With time, new versions of images roll…
Images comprise multiple layers, and most of the time, there is a relationship between various versions of containers that run on your server. With time, new versions of images roll…
In modern DevOps practices, Docker images are primarily built either on a developer machine or a CI/CD pipeline. The images are stored in a container registry and then deployed to…
Let’s modify the Dockerfile according to the multi-stage build process and see what we get. The respective files for this example are present in the ch4/go-hello-world/multi-stage directory within this book’s…
Let’s containerize a simple Go application that prints Hello, World! on the screen. While I am using Golang in this application, this concept is applicable universally, irrespective of the programming…
We built some Docker images in the previous section, so by now, you should know how to write Dockerfiles and create Docker images from them. We’ve also covered a few…
While EXPOSE and STOPSIGNAL are self-explanatory, let’s look at the HEALTHCHECK directive. The HEALTHCHECK directive runs a command (hence CMD) called curl -f localhost. So, this container will report itself…
When we build this file, we expect the index.html file to be copied to the /var/www/html directory within the container filesystem. Let’s have a look: $ docker build -t <your_dockerhub_user>/nginx-hello-world…
Building a container image is very simple. It is actually a one-line command: docker build -t <image-name>:version <build_context>. While we will discuss building container images in detail in the Building…
Instead of CMD, you can use ENTRYPOINT. While they serve a similar purpose, they are two very different directives. Every Docker container has a default ENTRYPOINT – /bin/sh -c. Anything…