Container

A container is a lightweight, isolated package that bundles an application with all its dependencies so it runs consistently anywhere. Containers are created from images by tools like Docker.

Git & DevOps

Unlike a full virtual machine, a container shares the host operating system's kernel, so it is far smaller and faster to start. Each container runs in its own isolated space with its own files and libraries.

Containers make it easy to run the same software on a developer's laptop, a test server, and production without surprises — a key building block of cloud-native and DevOps workflows.

Examples

Bash

docker run -d -p 8080:80 nginx
docker ps

Output:

CONTAINER ID   IMAGE   STATUS         PORTS
a1b2c3d4e5f6   nginx   Up 2 seconds   0.0.0.0:8080->80/tcp

See also

Back to the Dictionary