A container is a lightweight, isolated package that bundles an application with everything it needs to run, such as libraries and settings, so it behaves the same on a laptop, a test server or the cloud.

Definition
Containers solve the old problem of software that works on one machine and fails on another. A container image holds the application code, its runtime, system libraries and configuration in a single, versioned artifact. Running that image creates a container: an isolated process that shares the host’s operating system kernel but has its own file system, network and resource limits.
Because containers share the host kernel instead of each carrying a full operating system, they start in seconds and use far fewer resources than virtual machines. Docker popularized the format, and images now follow open standards so they can run on many runtimes and platforms. Containers are the usual unit of deployment for microservices and the building block that orchestration platforms such as Kubernetes manage.

How it works
A developer writes a build file, such as a Dockerfile, that lists a base image, the dependencies to install, the application files to copy in and the command to run. A build tool turns this into an image made of stacked, read-only layers. Layers are cached and shared, so rebuilding after a small code change is quick and images that share a base reuse the same files.
Images are pushed to a registry, a central store that deployment systems pull from. When a container starts, the runtime uses operating system features, namespaces on Linux for isolation and control groups for resource limits, so the process sees only its own files, network interfaces and processes, and cannot use more CPU or memory than allowed.
Containers are designed to be disposable. Anything that must survive a restart, such as uploaded files or database records, lives in mounted volumes or external services. This makes it easy to replace a container with a newer version, run several copies behind a load balancer, or move workloads between machines.
Keep learning
Put it into practice
CI/CD pipelines, infrastructure as code, observability and automation that make releases frequent, safe and routine.
Explore serviceCloud architecture, migration and modernization on AWS and Azure, planned for reliability, security and controlled cost.
Explore servicePurpose-built software engineered around how your business actually operates, with clean architecture and full code ownership.
Explore serviceFAQ
A virtual machine runs a full guest operating system on virtualized hardware, so it is heavier and slower to start but strongly isolated. A container shares the host’s operating system kernel and isolates only the application process, so it is lighter and starts in seconds. Many production systems run containers on top of virtual machines to get both.
Docker is a set of tools for building, sharing and running containers, and it made containers mainstream. The container itself is the isolated running process, and container images follow open standards. Other tools and runtimes can build and run the same images, and orchestration platforms often use runtimes other than Docker underneath.
No. A single container or a small group can run on one server with a simple runtime, a compose file, or a managed container service from a cloud provider. Kubernetes and similar orchestrators become useful when you run many containers across many machines and need scheduling, self-healing, rolling updates and service discovery.
Talk to a solution architect about where it fits in your roadmap.
