ScriptsApr 13, 2026·3 min read

Docker (Moby) — The Container Platform That Changed DevOps

Docker is the platform that popularized containerization. It packages applications with their dependencies into standardized containers that run consistently everywhere. Moby is the open-source project behind Docker Engine, the runtime that powers container-based development and deployment.

TL;DR
Docker packages applications with dependencies into containers that run consistently everywhere. Moby is the open-source engine behind it.
§01

What it is

Docker is the platform that popularized containerization. It packages applications with their dependencies into standardized containers that run consistently across development, testing, and production environments. Moby is the open-source project behind Docker Engine, the runtime that powers container-based workflows.

Docker provides a complete developer toolkit: Dockerfile for defining images, Docker Compose for multi-container applications, Docker Hub for image distribution, and Docker Desktop for local development.

§02

How it saves time or tokens

Docker eliminates environment inconsistency problems. A container that works on a developer's machine works identically in CI and production. This removes hours of debugging deployment-specific issues.

For AI development, Docker provides reproducible environments for model training, inference, and agent deployment. You can package an LLM inference server with all dependencies in a single container image.

Additionally, the project's well-structured documentation and active community mean developers spend less time troubleshooting integration issues. When AI coding assistants generate code for this tool, they can reference established patterns from the documentation, producing correct implementations with fewer iterations and lower token costs.

§03

How to use

  1. Write a Dockerfile:
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "app.py"]
  1. Build and run the container:
docker build -t my-app .
docker run -p 8000:8000 my-app
  1. Use Docker Compose for multi-service applications:
services:
  web:
    build: .
    ports:
      - '8000:8000'
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: secret
  1. Push images to Docker Hub or a private registry for deployment.
§04

Example

# Multi-stage build for smaller production images
FROM node:20 AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-slim
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
CMD ["node", "dist/server.js"]
§05

Related on TokRepo

§06

Common pitfalls

  • Using the latest tag in production. Pin specific image versions (python:3.12.3) to ensure reproducible builds and avoid unexpected breaking changes.
  • Running containers as root. Use USER directive in Dockerfiles to run as a non-root user for better security.
  • Not using multi-stage builds. Single-stage builds include build tools in the final image, increasing size and attack surface.
  • Failing to review community discussions and changelogs before upgrading. Breaking changes in major versions can disrupt existing workflows. Pin versions in production and test upgrades in staging first.

Frequently Asked Questions

What is the difference between Docker and Moby?+

Docker is the commercial product and brand. Moby is the open-source project that provides the core container runtime (Docker Engine). Docker Desktop, Docker Hub, and Docker's enterprise features are built on top of Moby. Most developers interact with Docker; Moby is the upstream open-source project.

Do I need Docker Desktop?+

Docker Desktop provides a GUI, Kubernetes integration, and easy setup on macOS and Windows. On Linux, you can install Docker Engine directly without Docker Desktop. Docker Desktop requires a paid subscription for companies with more than 250 employees or over $10M revenue.

How does Docker compare to Podman?+

Podman is a daemonless container engine that is CLI-compatible with Docker. Podman runs rootless by default, does not require a daemon process, and can generate systemd units. Docker has a larger ecosystem and more tooling. Both run the same OCI container images.

What is Docker Compose?+

Docker Compose is a tool for defining and running multi-container applications. You describe services, networks, and volumes in a docker-compose.yml file and start everything with docker compose up. It is the standard for local development environments.

Can Docker run AI workloads?+

Yes. Docker supports GPU passthrough via NVIDIA Container Toolkit for AI/ML workloads. You can run LLM inference servers, training pipelines, and AI agents in containers with full GPU access.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets