Images, containers, and Dockerfiles

An image is a stacked filesystem plus metadata; a container is a running instance of one. Every Dockerfile instruction is a layer.

Lesson 1.118m 20sAdvanced8.6k students

Chapters

18:20
  1. 0:00What is Docker?
  2. 0:27What is a Container?
  3. 1:00What is an Image?
  4. 1:18What are we doing Today?
  5. 1:47It all starts with a Dockerfile - FROM
  6. 3:20Environment Variables - ENV
  7. 3:51COPY Command
  8. 4:20Source files
  9. 5:57COPY command destination
  10. 6:39EXPOSE (You don't need this
  11. 7:17CMD Entry point
  12. 8:13How to Build a Docker image
  13. 9:16Building image with a tag
  14. 9:47How create a container
  15. 10:47See our container running
  16. 11:23Stopping and starting containers
  17. 12:10Cleaning up containers and images
  18. 12:33Dockerignore files (how to ignore files
  19. 13:51Docker exec into a container
  20. 15:23Add file to dockerignore file
  21. 16:50Other base images
  22. 17:52Stream Highlight - "Traefik is a series of tubes"

What this lesson covers

  • Distinguish an image from a running container
  • Write a Dockerfile that builds reproducibly
  • Choose a base image deliberately

This lesson sits in Containers and Images, part of DevOps with Docker and Kubernetes. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will

  • Distinguish an image from a running container
  • Write a Dockerfile that builds reproducibly
  • Choose a base image deliberately

Resources