THM : Intro to Docker

This guide walks you through the "Intro to Docker" room on TryHackMe, covering Docker basics, useful commands, and practical tasks for container management and orchestration. Whether you're new to Docker or refreshing your skills, this overview will help you gain a solid foundation in containerization.


Task 1: Introduction

No specific answers are needed for this task. If you've completed the Linux Fundamentals module on TryHackMe, you're well-prepared for this room.


Task 2: Basic Docker Syntax

  1. Pull an Image: To pull a Docker image from Docker Hub, use:

  2. List All Images: To list all Docker images on your system, use:

  3. Example Command: To pull a specific image:

    To pull a specific tag of an image:


Task 3: Running Your First Container

  1. Run a Container Interactively:

  2. Run in Detached Mode:

  3. Bind a Web Server to Port 80:

  4. List Running Containers:

  5. List All Containers (Including Stopped):


Task 4: Intro to Dockerfiles

  1. Specify Base Image:

  2. Run a Command:

  3. Build an Image from a Dockerfile:


Task 5: Intro to Docker Compose

  1. Start Services with Docker Compose:

  2. Stop and Remove Services:

  3. Docker Compose File: The configuration file for Docker Compose is named docker-compose.yml.


Task 6: Docker Socket and IPC

  1. IPC (Interprocess Communication): Docker enables communication between processes in containers.

  2. Docker Server Comparison: The Docker Server’s functionality can be compared to an API for managing and interacting with containers.


Task 7: Practical

  1. Identify Running Container: Connect to the machine to find the container name, which is typically listed as "CloudIsland."

  2. Run a Web Server:

    After launching the web server, visit the provided URL to retrieve the flag.

Last updated