Docker Containers

Understand Docker containers, how to run Docker images, and how to create a Docker image from an existing Docker container.

Docker container

Docker, Inc. is a founding member of the Open Container Initiative (OCI)—an organization that provides an open governance structure for the sole purpose of developing open industry standards for container formats and runtimes.

Docker, Inc. provided the initial codebase that served as the foundation for container runtime specification. As a result, what we learn about Docker containers in this lesson is applicable to other container runtimes.

As mentioned earlier, a Docker container is an instance of a Docker image. We can think of Docker images as the blueprint of Docker containers. The primary distinction between containers and images is that containers have a thin writable layer where data is stored.

When we create a new container, a thin writable layer is added on top of the Docker image’s underlying immutable layers. All changes such as creating a new file, modifying existing files, or deleting a file are stored on this writable layer.

This writable layer allows us to run multiple containers from a single image because each container has its own unique writable layer that is independent of others even if they share the same image.

Get hands-on with 1200+ tech skills courses.