#100DaysOfWeb in Python Transcripts
Chapter: Days 97-100: Docker and Docker Compose
Lecture: Your-turn, day 2

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Well you're not all the way through all of the lectures for this chapter. But you've gone far enough that it's time for you to try your hand at Docker.
0:09 So let's review the first part of the Your Turn stuff here. You've watched enough of the videos to see everything
0:17 we're going to talk about with regard to Docker itself. So now it is your turn to try to Dockerize one of your applications.
0:27 We're going to give you a few tips to help guide you along. You have the videos. You have the source code that we've
0:31 already submitted to the Repo and you have a choice. So you can either choose the easy path and just re-create re-Dockerize the Vue.js application
0:42 just like we did in the video. So you can follow along and that way you can always go and check back and that would be totally great.
0:48 Or you can choose the more adventurous path which case go back and choose one of the Python applications
0:55 either you've created during this course or one of the other demo applications that we've created throughout this course
1:02 and load that up configure it to run in a Docker container. That might require more than one Docker container. It might require just one.
1:10 So whatever it takes you know build it up that way. Now for the tips. Here are a couple of tips on building Docker containers.
1:17 Here are a couple of the commands you need to run it. So you always need to start by building it. Maybe you specify a tag for the name
1:24 so you don't always have to run it by container id. You run it with a container id if you want to login to it this is basically the way you do it here.
1:32 See what's running, Docker PS into stop a running line you do this kill container id. Remember you don't have to type the entire hash or sha
1:41 from the container id just enough to be unique and that's all you need. And then remember that Docker files are mainly just commands
1:52 that layer on configuration or changes to a given Linux machine. So we start with a base image. You could pick a picture related or something else
2:01 whatever makes since for you. And then we run commands. We modify the environment. We can copy files or we can copy directories.
2:10 Then you set an entry point to have it run if you want or you can simply pass this command to the container as well when you start it up.
2:17 That's it. So in this first day you're just going to watch the videos up to here. The second day you're going to containerize something.
2:25 Either something we built or something you built. We'll come back after we talk about building multi-container systems with Docker Compose
2:32 and layering on a little bit of orchestration with Docker Compose for what you're building here.


Talk Python's Mastodon Michael Kennedy's Mastodon