Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

The Complete Guide to Docker

22. 06. 2022 Updated: 24. 03. 2026 1 min read intermediate
This article was published in 2022. Some information may be outdated.

Docker changed the way we build and deploy software. Here is the complete guide.

What is Docker

Docker packages an application plus all its dependencies into a container. “Works on my machine” becomes “Works everywhere.”

Basic Commands

docker run -d -p 8080:80 nginx
docker ps
docker stop
docker rm
docker images
docker pull postgres:16

Dockerfile

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci –production
COPY . .
EXPOSE 3000
CMD [“node”, “index.js”]

Docker Compose

services:
app:
build: .
ports: [“3000:3000”]
depends_on: [db]
db:
image: postgres:16
environment:
POSTGRES_PASSWORD: secret
volumes: [“pgdata:/var/lib/postgresql/data”]
volumes:
pgdata:

Networking

docker network create mynet
docker run –network mynet –name app myapp
docker run –network mynet –name db postgres

Volumes

docker volume create mydata
docker run -v mydata:/data myapp
docker run -v $(pwd):/app myapp # bind mount

Multi-stage Builds

FROM node:20 AS build
RUN npm run build

FROM node:20-alpine
COPY –from=build /app/dist ./dist

Best Practices

  • Alpine images
  • Multi-stage builds
  • Non-root user
  • .dockerignore
  • Health checks
  • Pinned versions

Next Step

Learn Docker Compose for multi-container apps, then Kubernetes for orchestration.

dockerkontejnerydevops
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.