Docker Basics

Docker Basics

Docker packages applications into containers — lightweight, portable units that run the same everywhere. It's the foundation of modern DevOps.
bash
# Run a container
docker run hello-world

# Run an interactive Ubuntu container
docker run -it ubuntu bash

# List running containers
docker ps

# List all containers (including stopped)
docker ps -a

# Build from a Dockerfile
docker build -t myapp .

# Run with port mapping
docker run -p 3000:3000 myapp

Tip:Containers share the host's kernel but are isolated from each other. They're much lighter than virtual machines.

Terminalbash
Welcome to the Linux Terminal Simulator!
Type commands below. Use 'help' to see available commands.
user@codewithmuh:~$

💬 Got questions? Ask me anything!