Skip to main content

Container

In Turkish
Konteyner
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/container

In short

A container is a lightweight, isolated package that bundles an application with its dependencies and runs it on the host's shared operating system kernel.

What is a container?

A container is a standard unit of software that includes an application's code together with everything it needs to run, such as the runtime, system libraries, and settings. Because the package is self-contained, the application behaves the same wherever the container runs, whether on a laptop, a server, or in the cloud.

Containers rely on features of the Linux kernel: namespaces give each container its own isolated view of processes, files, and networking, and cgroups (control groups) limit how much CPU and memory it can use. Every container starts from an image, a read-only template built in layers, and a container runtime such as containerd or CRI-O starts and stops it.

Think of apartments in a building: each apartment has its own locked door, rooms, and utility meter, but all of them share the same foundation and plumbing. In the same way, containers are isolated from one another but share the host's operating system kernel, which makes them fast to start and efficient to run in large numbers.

The most common confusion is between containers and virtual machines. A virtual machine includes an entire guest operating system on top of a hypervisor, so it is heavier and slower to boot but more strongly isolated. Containers share the host kernel, so they are often measured in megabytes instead of gigabytes and start in about a second or less.

At a glance

Two containers run on a container runtime and share one host operating system kernel, while two virtual machines each carry a full guest operating system on top of a hypervisor.ContainersVirtual machinesApp A+ librariesApp B+ librariesContainer runtimeHost operating systemone shared kernelHardwareApp A+ librariesApp B+ librariesGuestoperating systemGuestoperating systemHypervisorHardware
Containers share the host's kernel, so they stay small and start fast. Each virtual machine boots its own operating system.

Key takeaways

  • A container packages an app with its dependencies so it behaves the same everywhere.
  • Containers share the host operating system kernel, unlike virtual machines.
  • Linux namespaces provide isolation, and cgroups limit resources.
  • Containers are created from images that follow the OCI standard.
  • Docker builds and runs containers; Kubernetes manages them at scale.

Example

Working with a container from the command linebash
# Download the nginx image and start a container from it
docker run -d --name web -p 8080:80 nginx

# List running containers
docker ps

# Open a shell inside the running container
docker exec -it web sh

# Stop and remove the container (the image stays on disk)
docker stop web && docker rm web

Readers ask

What is the difference between a container and a virtual machine?

A virtual machine runs a full guest operating system on virtualized hardware, while a container shares the host's kernel and isolates only the application. Containers are lighter and faster to start; virtual machines offer stronger isolation.

Are containers the same as Docker?

No. Containers are a general technology, and Docker is one popular set of tools for building and running them. Images built with Docker follow the OCI standard and can also run with other tools such as Podman or containerd.

Can containers run on Windows and macOS?

Yes. Tools like Docker Desktop run Linux containers inside a lightweight virtual machine on macOS and Windows, and Windows also supports native Windows containers.

Often compared

See also

Sources

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings