Docker Compose – Running a Multi-Container App

In short, Compose is a tool (now shipped by default with Docker) that allows you to easily define and run multi-container applications using a YAML file. The structure of the YAML file is defined by Compose. The Compose file should be called compose.yaml or compose.yml. Its structure includes the following top-level keys: Digging deeper:The core

Docker Self Healing – Restart Policies

Restart policies are rules for restarting containers. There are four:●​ no (default)●​ on-failure●​ always●​ unless-stopped In the table: Y = Restart, N = No Restart How to use it To apply these policies, use --restart <policy> when running a container: or when update:

Docker – external tools (debugging)

A typical Docker image doesn’t have built-in tools that you can find in a standard Linux system. The best way to use tools like vim, ping, etc. is to use Docker Debug. Docker Debug is a useful tool for working with slim images and containers. It gives you shell access even when the container or

Docker Image

Docker images are lightweight, read-only packages that contain everything you need to run an application: When a container is running from an image, the container is bound to that image. That means you can’t delete the image while the container is running. It is worth mentioning that an image does not contain a full OS,

The shim (in modern Docker/containerd architecture)

The shim (in modern Docker/containerd architecture) is a small process that is started for each container. Its job is to sit between the container runtime and the container process itself. What it does enable is this: So in that sense: Important clarification: So the correct mental model is: But: Summary: The shim does not remove

Docker – First Contact

Good option is to set docker to use this without writing sudo The Ops Perspective check the docker version Download an Image Image is similar to VM templates (for people working in operations) and to classes (for developers). check current (pulled) images Pull the ubuntu:latest image (if you don’t have it) NGINX is a server-side

ARP Resolver

ARP – Address Resolution Protocol Communication at the link layer (Layer 2) is done using MAC addresses. If the sender’s ARP resolver does not have the destination MAC address in its ARP cache, it sends a broadcast ARP request to all hosts in the same subnet/LAN. To do this, the sender must know the IP

MAC address

MAC – Medium Access Control MAC addresses in end-to-end communication Example path:PC → Router → ISP → Router → Server At every router: Because of this: Key takeaway MAC addresses are: IP addresses are: Mental model Worth mentioning! In this example, every host has its own MAC address, and the router also has a MAC