Video by freeCodeCamp.org · streamed from YouTube. All rights remain with the creator.
Lesson 1: Docker for Beginners: Running Applications in Containers
About this lesson
This beginner course introduces Docker, the tool that packages applications into containers so they run the same way on any machine, and it comes with hands-on labs that run in the browser. It begins by explaining what Docker is and why it is so useful, comparing containers with virtual machines,, then shows how to install it. You learn the basic commands for running, listing, stopping and removing containers and for downloading and managing images, followed by a closer look at the run command and its options, including running containers in the background, connecting to them and passing configuration through environment variables. The course then explains how Docker images are built from a Dockerfile, how each instruction adds a layer, and the difference between the CMD and ENTRYPOINT instructions that decide what a container runs when it starts. Next it covers networking, from the default networks Docker creates to connecting containers to one another and publishing ports, and storage, including how volumes keep data safe when containers are removed. You see how Docker Compose describes an application made of several containers in a single file, and how a registry stores and shares images. The course also explains how Docker works on Windows and on Mac, where a small Linux virtual machine runs behind the scenes. It ends with container orchestration, introducing Docker Swarm and giving a first look at Kubernetes. No previous experience with containers is needed. Afterwards, read Chapter 1 of the course book.