Skip to content
BoKSA

CI/CD & Containerization Fundamentals

CI/CD & Containerization Fundamentals

Use this page to revise the vocabulary behind automated pipelines and containers.

What CI/CD means

CI/CD stands for Continuous Integration / Continuous Deployment. A typical pipeline runs a fixed sequence of stages — commonly lint (style/quality checks), test (automated tests), build (compiling, bundling, packaging), and deploy (releasing the result) — automatically, on every relevant change, instead of relying on someone to remember to do it manually.

Pipeline structure

A pipeline definition is usually written in YAML, describing jobs (a unit of work, e.g. "run tests"), made up of steps (individual commands), which may use pre-built actions (reusable steps someone else wrote). Reading pipeline logs means finding which stage/step failed and why — usually the first red line in the log, not the last one.

Containers vs. virtual machines

A container packages an application with its dependencies and shares the host's OS kernel, so it starts fast and uses fewer resources. A virtual machine includes a full guest OS and is virtualised at the hardware level, so it starts slower and uses more resources, but can run a completely different OS than the host.

Dockerfile and CLI basics

A Dockerfile describes how to build an image, using instructions such as FROM (base image), COPY (add files), RUN (execute a build-time command), CMD (the default command when the container starts), EXPOSE (documents a port), and WORKDIR (sets the working directory). A .dockerignore file excludes files from being copied into the image (similar in spirit to .gitignore). Core CLI commands: docker build (build an image), docker run (start a container), docker ps (list running containers), docker stop, and docker logs.

Ports and multi-container setups

Port mapping (-p host:container) connects a port on your machine to a port inside the container. Docker Compose describes multiple containers (e.g. an app and a database) and how they connect, in one docker-compose.yml file, so you can start an entire multi-container setup with a single command instead of running each container by hand.

Starting Points

Key Points

  • You can explain what CI/CD means and name the typical pipeline stages in order (lint → test → build → deploy).
  • You can read a pipeline log to identify which stage failed.
  • You can explain the difference between a container and a virtual machine.
  • You can name the core Dockerfile instructions (FROM, COPY, RUN, CMD, EXPOSE, WORKDIR) and what each does.
  • You can explain what .dockerignore does and name the basic Docker CLI commands.
  • You can explain port mapping and what Docker Compose is used for.