Sarah Johnson | DevOps Conference 2025 | December 15, 2025
Modern software development faces complexity challenges:
Docker makes development predictable and deployment reliable.
A lightweight, standalone package that includes:
Think of it as: A shipping container for your software!
Docker Desktop is available for all platforms:
docker --version # Output: Docker version 24.0.0 docker run hello-world # Pulls and runs a test container
Let’s run a simple web server:
# Pull the nginx image docker pull nginx:latest # Run the container docker run -d -p 8080:80 --name my-web-server nginx # Check it's running docker ps # Visit http://localhost:8080 in your browser
An image is a template for creating containers:
# Search for images docker search python # List local images docker images
Build custom images with a Dockerfile:
# Start from a base image FROM python:3.11-slim # Set working directory WORKDIR /app # Copy application files COPY . . # Install dependencies RUN pip install -r requirements.txt # Define the command to run CMD ["python", "app.py"]
# Build the image docker build -t my-python-app:1.0 . # The -t flag tags your image with a name and version # The . specifies the build context (current directory) # Run your custom container docker run -d -p 5000:5000 my-python-app:1.0
docker ps
docker ps -a
docker stop
docker stop my-web-server
docker rm
docker rm my-web-server
docker logs
docker logs my-web-server
docker exec
docker exec -it my-web-server bash
For multi-container applications
Define your entire stack in docker-compose.yml
docker-compose.yml
Start everything with one command
docker-compose up
version: '3.8' services: web: build: . ports: - "5000:5000" depends_on: - db db: image: postgres:15 environment: POSTGRES_PASSWORD: secretpassword volumes: - db-data:/var/lib/postgresql/data volumes: db-data:
# 1. Write your Dockerfile vim Dockerfile # 2. Build your image docker build -t myapp:dev . # 3. Run and test docker run -p 8080:8080 myapp:dev # 4. Make changes, rebuild # Docker caches layers for speed! # 5. Push to registry when ready docker push myregistry.com/myapp:1.0
Sarah Johnson sarah.johnson@example.com @sarahjdev on Twitter https://github.com/sarahjohnson