Image history – Creating and Managing Container Images

To understand images and their layers, you can always inspect the image history. Let’s inspect the history of the last Docker image by running the following command: As you can see, there are several layers, and every layer has associated commands. You can also see when the layers were created and the size of the […]

Read More… from Image history – Creating and Managing Container Images

The layered filesystem – Creating and Managing Container Images

Layers in Docker are intermediate Docker images. The idea is that every Dockerfile statement we execute on top of a layer changes something within the layer and builds a new one. The subsequent statement modifies the current one to generate the next one. The final layer executes the Docker CMD or ENTRYPOINT command, and the […]

Read More… from The layered filesystem – Creating and Managing Container Images

Docker architecture – Creating and Managing Container Images-2

So, Docker is like your magical kitchen where you make dishes (containers) using plans (Dockerfiles) and ingredients (images) with the assistance of your kitchen helpers (Docker Engine). You can even serve entire meals (Docker Compose) and use special storage areas (volumes) and communication paths (networks) to make your dishes even more amazing. Just like a […]

Read More… from Docker architecture – Creating and Managing Container Images-2

Docker architecture – Creating and Managing Container Images-1

Imagine you’re a passionate chef dedicated to creating mouthwatering dishes that satisfy hungry customers. In your kitchen, which is a magical place called Docker, you have special powers to plan, make, and showcase your culinary creations. Let’s break down the key parts: Ingredients (Application Code and Dependencies): Imagine your kitchen has shelves filled with ingredients […]

Read More… from Docker architecture – Creating and Managing Container Images-1

Separate multiple environment YAMLs using overrides – Containerization with Docker

Docker Compose best practices Docker Compose provides a declarative way of managing Docker container configuration. This enables GitOps for your Docker workloads. While Docker Compose is primarily used in development environments, you can use it in production very effectively, especially when Docker runs in production and does not use another container orchestrator such as Kubernetes. […]

Read More… from Separate multiple environment YAMLs using overrides – Containerization with Docker

Creating the docker-compose file – Containerization with Docker

The next step in the process is to create a docker-compose file. A docker-compose file is a YAML file that contains a list of services, networks, volumes, and other associated configurations. Let’s look at the following example docker-compose.yaml file to understand it better: version: “2.4” services: flask: image: “bharamicrosystems/python-flask-redis:latest” ports: networks: redis: image: “redis:alpine” networks: […]

Read More… from Creating the docker-compose file – Containerization with Docker

Declarative container management with Docker Compose – Containerization with Docker

Docker Compose helps you manage multiple containers in a declarative way. You can create a YAML file and specify what you want to build, what containers you want to run, and how the containers interact with each other. You can define mounts, networks, port mapping, and many different configurations in the YAML file. After that, […]

Read More… from Declarative container management with Docker Compose – Containerization with Docker

Configuring Prometheus to scrape metrics – Containerization with Docker

We will now configure Prometheus on the Prometheus machine so that it can scrape the metrics from cAdvisor. To do so, modify the /etc/prometheus/prometheus.yml file so that it includes the following within the server running Prometheus: $ sudo vim /etc/prometheus/prometheus.yml … scrape_interval: 5s static_configs: After changing this configuration, we need to restart the Prometheus service. […]

Read More… from Configuring Prometheus to scrape metrics – Containerization with Docker

Typical challenges and best practices to address these challenges with Docker logging – Containerization with Docker

Docker allows you to run multiple applications in a single machine or a cluster of machines. Most organizations run a mix of virtual machines and containers, and they have their logging and monitoring stack configured to support virtual machines. Most teams struggle to make Docker logging behave the way virtual machine logging works. So, most […]

Read More… from Typical challenges and best practices to address these challenges with Docker logging – Containerization with Docker

Configuring logging drivers – Containerization with Docker

Let’s start by finding the current logging driver: $ docker info | grep “Logging Driver” Logging Driver: json-file Currently, the default logging driver is set to json-file. If we want to use journald or Splunk as the default logging driver, we must configure the default logging driver in the daemon.json file. Edit the /etc/docker/daemon.json file […]

Read More… from Configuring logging drivers – Containerization with Docker