← Back to blog

Docker for small teams: the parts that actually pay off

By 1 min read
  • #devops
  • #docker
  • #backend

When people hear “Docker” they often jump straight to microservices, orchestration and a wall of YAML. On the small teams I’ve worked with — Arkcode included — the value is much more modest, and much more immediate: everyone runs the same thing.

”Works on my machine” stops being a sentence

The single biggest win is killing environment drift. PHP version, the MySQL build, an extension someone installed two years ago — all of it gets pinned in a Dockerfile and a docker-compose.yml. A new developer clones the repo, runs one command, and has the exact stack everyone else has.

services:
  app:
    build: .
    ports: ['8080:80']
    depends_on: [db]
  db:
    image: mysql:8.0
    environment:
      MYSQL_DATABASE: app
    volumes: ['db-data:/var/lib/mysql']
volumes:
  db-data:

That’s it. No “first install these seven things from the wiki.”

A few habits that keep images small and safe

  • Use small base images (-slim, -alpine) where you can — smaller surface, faster pulls.
  • Order layers from least to most volatile. Copy and install dependencies before copying your source, so a code change doesn’t reinstall everything.
  • Add a .dockerignore. Don’t bake node_modules, .git and local env files into the image.
  • Never put secrets in the image. They belong in environment variables at runtime, not in a layer anyone can docker history.

You don’t need Kubernetes

For a team shipping to one or two servers, docker compose up on the host (or a simple managed container service) is plenty. Reach for orchestration when you have a scaling problem you can actually point to — not because a blog post said to.

Docker earns its keep the moment a second person touches your project. That’s a low bar, and it’s exactly why it’s worth setting up early.