1.2.1 - Introduction to Docker
Last updated Jan 22, 2025
Youtube Video | ~24 min
✍️ In this video, we learn about what Docker is, get a pipeline overview, and learn about Docker container and Docker image. Then we work through an example of how to build an image with Docker.
⚒️ There is a supplemental video for those working on WSL found here: https://www.youtube.com/watch?v=Mv4zFm2AwzQ&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=17
What is...
"Docker helps developers build, share, run, and verify applications anywhere — without tedious environment configuration or management." - https://www.docker.com/
"Simply put, containers are isolated processes for each of your app's components. Each component - the frontend React app, the Python API engine, and the database - runs in its own isolated environment, completely isolated from everything else on your machine." - https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-container/
"If you’re new to container images, think of them as a standardized package that contains everything needed to run an application, including its files, configuration, and dependencies. These packages can then be distributed and shared with others." - https://docs.docker.com/get-started/introduction/build-and-push-first-image/
"A tag is a custom, human-readable identifier that's typically used to identify different versions or variants of an image. If no tag is specified, latest is used by default." - https://docs.docker.com/get-started/docker-concepts/building-images/build-tag-and-publish-an-image/
Building a Container Image
Example code you want to deploy
Dockerfile
📝 Create a new 'Dockerfile' in your code editor. I recommend adding the Docker 'plug in' to your editor.
🔖 https://docs.docker.com/reference/dockerfile/ - Dockerfile Instruction options i.e. 'FROM', 'RUN', etc.
Docker build
⬛ Terminal
used to denote adding a tag
replace these values for your image_name and tag_name
a build command that uses the current directory (.) as a build context
👀 Note we will continue to build on this topic. We still need to talk about running containers, stopping containers, and viewing the front end of our containers.
🧹 Cleaning - be sure to open Docker Desktop and delete testing examples of your containers and images to free up space
Resources
My repo for this video can be found here
🔖 https://docs.docker.com/get-started/docker-overview/
🔖 https://github.com/HangenYuu/docker-cheatsheet
📚 I recommend working through the Docker site Intro & workshop if you're still confused on what Docker is
Last updated