Docker: Zero to Confident

0%
docker-lab, bash
Welcome to the DevOpsLesson Docker Lab 🐳
This is a safe, simulated Docker environment. Nothing runs on your machine.
Follow the steps on the left. Type a command below, or type 'help' anytime.
 
devops@docker-lab:~$

Every command this lab teaches

Docker: Zero to Confident is 18 steps, about 25 minutes. Each one asks a question, you type the answer in the terminal above, and it is checked before you move on. Nothing is installed and nothing can break.

Beginner6 steps

  1. Print the installed Docker version.docker --version
  2. Show system-wide Docker information.docker info
  3. Pull the official hello-world image.docker pull hello-world
  4. Show all local images.docker images
  5. Run a container from the hello-world image.docker run hello-world
  6. List all containers, including stopped ones.docker ps -a

Intermediate6 steps

  1. Download the nginx image.docker pull nginx
  2. Run nginx detached, named "web", mapping 8080→80.docker run -d --name web -p 8080:80 nginx
  3. Show running containers.docker ps
  4. View the logs from the "web" container.docker logs web
  5. Execute "ls /" inside the "web" container.docker exec web ls /
  6. Inspect the "web" container.docker inspect web

Advanced6 steps

  1. Stop the "web" container.docker stop web
  2. Start the "web" container back up.docker start web
  3. Run an alpine container with MODE=prod set.docker run -e MODE=prod alpine env
  4. Create a volume called "appdata".docker volume create appdata
  5. Force-remove the running "web" container.docker rm -f web
  6. Remove the nginx image.docker rmi nginx