For example, imagine a PHP application that requires:
It allows administrators and developers to execute commands such as:
docker build: Build an image.docker run: Create and start a container.docker pull: Download an image.docker ps: List running containers.docker stop: Stop a container.The Docker Client communicates with the Docker daemon through the Docker API.
The Docker daemon is the background service responsible for managing Docker resources.
For example, a vulnerable login form that directly inserts user input into an SQL query may allow an attacker to alter the query’s logic.
You can check its status using:
On Linux, the daemon normally runs as a system service.
The Docker API provides the communication interface between the Docker Client and the Docker daemon.
When a user executes a Docker command, the client sends an API request to the daemon, which performs the requested operation.
This API also allows external tools and automation platforms to interact with Docker.
containerd is a container runtime responsible for managing the container lifecycle and related operations.
It handles tasks such as:
Docker Engine uses containerd as part of its internal architecture.
runc is a low-level container runtime that implements the Open Container Initiative (OCI) runtime specification.
It is responsible for creating and starting containers using Linux kernel features such as namespaces and control groups.
In simplified terms:
A Docker image is a read-only template used to create containers.
It contains the application code, runtime, dependencies, and filesystem layers required to run an application.
docker pull php:8.3-apache
This command downloads a PHP image that includes PHP 8.3 and Apache.
Images are built from layers, allowing multiple images to reuse common components and reducing unnecessary duplication.
An image is the template, while the container is the actual execution environment created from that template.
A single image can be used to create multiple containers.
Each container has its own isolated process environment and writable container layer.
A Docker Registry stores and distributes Docker images.
Docker Hub is one of the most commonly used public registries.
Developers can download existing images or publish their own images for deployment across different environments.
Organizations can also use private registries to control access to their application images.
Containers are designed to be disposable. Data written only inside a container’s writable layer may disappear when the container is removed.
Docker volumes provide persistent storage independent of the container lifecycle.
Ensuring your web applications align with OWASP standards is essential for safe guarding user data and maintaining business continuity.
