51 cards
A container is a lightweight, standalone, executable package that bundles an application together with everything it needs to run: the application code, a runtime, libraries, and all of its dependencies. Because the package is self-contained and isolated from the host system, the application behaves the same way regard...
Under the hood, Docker is built around a long-running background process called the Docker daemon, often invoked as dockerd. The daemon is the engine that creates and manages Docker objects such as images, containers, networks, and volumes, and it exposes its functionality through a REST API. Client tools, including th...
A Dockerfile is a plain-text file containing a series of instructions that Docker uses to build an image automatically. The build is triggered with docker build -t name:tag ., where the trailing dot specifies the current directory as the build context. Each instruction in the Dockerfile creates a new layer in the resul...
The docker run command is the primary way to create and start a new container from an image. For example, docker run -it ubuntu bash launches an Ubuntu container with an interactive terminal. By default, docker run attaches to the container's foreground, but adding the -d flag runs the container in detached mode in the...
Containers are designed to be ephemeral, so data written inside them is lost when the container is removed. Docker solves this with volumes, which are persistent storage objects managed by Docker that exist independently of any single container's lifecycle. Volumes can be mounted into multiple containers at once, makin...
Most real applications are not a single container but a collection of cooperating services such as a web server, an application server, and a database. Docker Compose is a tool for describing such multi-container applications declaratively in a YAML file called docker-compose.yml, which lists each service along with it...
Security is a recurring concern when packaging and running shared workloads. Docker Content Trust, abbreviated DCT, is a mechanism that signs images with cryptographic keys so that consumers can verify both the integrity and the publisher of an image during push and pull operations. You enable it by exporting the envir...