From the course: Docker for Data Engineers

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Running your first container using docker run

Running your first container using docker run - Docker Tutorial

From the course: Docker for Data Engineers

Running your first container using docker run

Let's head back to Docker on our local machine. Here I am in the terminal window of my macOS machine. Now you should know that when we install Docker locally, Docker sets up a repository on our local machine, which we can refer to as the local repository. If you want to see what images are available in the local repository, you can run the Docker images command. You can see at this point in time, our local repo is empty. If you want to view all of the containers currently present in your local system, including containers that are running, stopped, or exited, run the docker ps -a command. Well, we haven't created any containers yet, and you can see that this is completely empty as well. We are now going to create and run our very first container using a single command, and this command is going to do a whole lot of stuff under the hood. Docker run hello-world. The Docker run command is used to create and run a container from an image. Hello-world here is the name of the image. This is…

Contents