What You'll Learn

  • Pull the official Nginx Docker image
  • Run an Nginx container with Docker
  • Expose and map container ports to your host machine
  • Access the Nginx server live in your browser
  • Understand basic Docker port binding (-p flag)

Prerequisites

  • Docker installed on your machine
  • Basic familiarity with the terminal / command line

Commands Used in This Video

docker --version
docker pull nginx:latest
docker run -d -p 8080:80 --name kejalnova-web nginx:latest
docker container ls

Then open your browser and go to:

http://localhost:8080

Tags

#docker