← All insightsGetting Started

Getting started with Docker

CodeWizard Engineering · 28 September 2026 · 3 min read · Beginner

Docker builds, ships and runs applications inside containers - isolated processes that bundle the code, runtime and libraries so 'works on my machine' stops being a problem.

Why teams use it

  • Reproducible builds: the same image runs identically on a laptop, CI and production
  • Fast, isolated environments without the overhead of full virtual machines
  • A universal packaging format that every orchestrator and cloud understands

Install it

bash
# Install Docker Engine on Ubuntu
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker "$USER"   # run docker without sudo (re-login after)
docker version

A first working config

A small, cache-friendly multi-stage Dockerfile for a Node service.

dockerfile
# syntax=docker/dockerfile:1
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine AS run
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/server.js"]

Run and verify

bash
docker build -t myapp:1.0 .
docker run --rm -p 3000:3000 --name myapp myapp:1.0
docker ps
docker logs -f myapp
docker exec -it myapp sh

Mistakes to avoid early

  • Running as root inside the container - always add a non-root USER
  • Fat images from a single-stage build; use multi-stage and slim/alpine bases
  • Baking secrets into layers with COPY or ENV - they stay in the image history

Want senior help putting Docker to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult