Running a container with docker run
📖 Scenario: You want to run a simple web server inside a Docker container on your computer. This will help you understand how to start containers using the docker run command.
🎯 Goal: Learn how to run a Docker container using the docker run command with specific options to start a web server and expose it to your computer.
📋 What You'll Learn
Use the official
nginx Docker imageRun the container in detached mode
Map port 8080 on your computer to port 80 in the container
Name the container
mynginx💡 Why This Matters
🌍 Real World
Running containers is how many developers and system administrators deploy applications quickly and consistently on any machine.
💼 Career
Knowing how to use <code>docker run</code> is a fundamental skill for DevOps roles, cloud engineers, and software developers working with containerized applications.
Progress0 / 4 steps