Docker Volumes

We’ve used quite a few images thus far through this course, and now let’s spend a little bit of time talking about how to manage and keep track of the images we’re working with.So you can list the images that you’ve already downloaded with the docker images command. It only lists the images you’ve already downloaded. It’s not the tool for finding images to download. We’ll cover that later. So, docker images. Alright I can see there are several imageson my machine. Now spend a little time, this is where it came from, the tag on it, this one has no name and no tag.

The image ID we’ve mentioned before. So wanna mention the size here. Because these images share a great deal of their underlying data, you don’t sum up the sizes here to get the total amount of space the docker’s using. In this case, all of these 122 megabyte images here are actually the same 122 megabytes, with different names on them. Docker is much more space efficient than it would look like just from looking at this list. So don’t get scared by that.

Docker Images

We’ve used quite a few images thus far through this course, and now let’s spend a little bit of time talking about how to manage and keep track of the images we’re working with.So you can list the images that you’ve already downloaded with the docker images command. It only lists the images you’ve already downloaded. It’s not the tool for finding images to download. We’ll cover that later. So, docker images. Alright I can see there are several imageson my machine. Now spend a little time, this is where it came from, the tag on it, this one has no name and no tag.

The image ID we’ve mentioned before. So wanna mention the size here. Because these images share a great deal of their underlying data, you don’t sum up the sizes here to get the total amount of space the docker’s using. In this case, all of these 122 megabyte images here are actually the same 122 megabytes, with different names on them. Docker is much more space efficient than it would look like just from looking at this list. So don’t get scared by that.

Run Processes in Containers

So docker containers have one main process, and they can have names. You don’t give it a name, it’ll make one up. Let’s take a look at that. So if I run docker run, just like the example we’ve been using a lot, I’m gonna throw in some extra arguments we haven’t used before. So I’m gonna throw in the –rm. This is a very common command, lots of people us it all the time when you just wanna run something in your container, but you don’t wanna keep the container afterwards. That says delete this container when it exits.

Docker Architecture

Now that we’ve got Docker installed, and talked a little bit about what Docker is,let’s talk about what Docker does. The Docker Flow, the fundamental concept, in Docker, it all begins with an image. An image is every file that makes up just enough of the operating system to do what you need to do. Traditionally you’d install a whole operating system with everything for each application you do. With Docker you pair it way down so that you have a little container with just enough of the operating system to do what you need to do, and you can have lots and lots of these efficiently on a computer.

Getting Started with Docker

In this lab, we will look at some basic Docker commands and a simple build-ship-run workflow. We’ll start by running some simple containers, then we’ll use a Dockerfile to build a custom app. Finally, we’ll look at how to use bind mounts to modify a running container as you might if you were actively developing using Docker.