Page cover

whale1.2.1 - Introduction to Docker

Last updated Jan 22, 2025

Youtube Video | ~24 min

https://www.youtube.com/watch?v=EYNwNlOrpr0&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=4&pp=iAQBarrow-up-right
circle-info

To work through this video you will need Docker πŸ‹ downloaded, a terminal window β–ͺ️, and a code editor πŸ“ of choice (Pycharm for me). Please see the 'Introduction' section if you need more info.

✍️ 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=17arrow-up-right

What is...

"Docker helps developers build, share, run, and verify applications anywhere β€” without tedious environment configuration or management." - https://www.docker.com/arrow-up-right

https://blog.devgenius.io/docker-working-and-image-building-2d4901524617arrow-up-right

Building a Container Image

Example code you want to deploy

1

Dockerfile

Supplemental Info on writing a 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/arrow-up-right - Dockerfile Instruction options i.e. 'FROM', 'RUN', etc.

2

Docker build

⬛ Terminal

-t
{image_name}:{tag_name}
.

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

3

Docker run

⬛ Terminal

πŸ‘€ 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

Not found

πŸ”– https://docs.docker.com/get-started/docker-overview/arrow-up-right

πŸ”– https://github.com/HangenYuu/docker-cheatsheetarrow-up-right

πŸ“š I recommend working through the Docker site Intro & workshop if you're still confused on what Docker is

Last updated