80%
Docker, CI/CD & Deployment Images, containers, Compose, pipelines, Nginx, AWS basics0/26 questions known
1. Images and containers
DefinitionA Docker image is a read-only, layered package of an app + its runtime and dependencies.
shares the host kernel: has its own OS kernel
starts in seconds, MBs: starts in minutes, GBs
process-level isolation: hardware-level isolation
Layer caching: copy package.json and install before copying source code.
Use .dockerignore (node_modules, .git, .env).
Containers are disposable: keep data in volumes or managed databases.
2. Docker Compose
docker compose up -d, logs -f api, exec api sh, down (add -v to delete volumes).
Containers on the same Compose network reach each other by service name.
3. CI/CD pipelines
FlowFlowPush / PR→Install (npm ci)→Lint + type-check→Test→Build image→Push to registry→Deploy (staging → prod)→Smoke test / rollback
CI (continuous integration): every change is built and tested automatically.
Same tools elsewhere: Jenkins (Jenkinsfile stages), GitLab CI, CircleCI.
Deploy strategies: rolling, blue-green (switch traffic between two environments), canary (a small % first).
Keep database migrations backwards-compatible so you can roll back the app.
4. Nginx, domains and HTTPS
DNS: an A record points the domain at the server IP; a CNAME points at another name.
Free TLS certificates with Let's Encrypt (certbot) and auto-renewal.
Nginx also serves static files, gzip/brotli, caching and load balancing (upstream).
5. Cloud basics (AWS)
EC2: virtual servers
S3: file / object storage, static sites
CloudFront: CDN
RDS / Aurora: managed SQL databases
Vercel / Netlify for frontends and Next.js; Render, Railway or Fly.io for simple backends.
Least privilege IAM, private subnets for databases, backups, and alarms on errors and cost.
ReviseImage = package, container = running instance.
Most asked (9)
QWhat is the difference between a container and a virtual machine?A virtual machine emulates a whole computer: a hypervisor runs a full guest OS with its own kernel on top of the host.
QWhat is the difference between a Docker image and a container?An image is a read-only template: a stack of filesystem layers plus metadata (default command, env, exposed ports).
QWalk through the common Dockerfile instructions.- FROM: the base image, always first - WORKDIR: sets (and creates) the working directory - COPY / ADD: put files into the image - RUN…
QCMD vs ENTRYPOINT?Both define what runs when the container starts.
QHow do image layers and the build cache work? How should you order instructions?Each RUN, COPY and ADD produces a layer.
QWhat is a multi-stage build and why use it?A multi-stage Dockerfile has several FROM stages.
QWhat is Kubernetes? Explain pod, deployment and service.Kubernetes is a container orchestrator: you declare the desired state in YAML and it keeps reality matching it across a cluster…
QCI vs continuous delivery vs continuous deployment?- Continuous Integration: every push or PR is automatically built and tested (lint, unit tests, build).
QBlue-green vs canary vs rolling deployments?- Rolling: replace instances a few at a time.