LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
DevOps / SRE foundations
LESSON 2 OF 3 · ABOUT 16 MINUTES + EXERCISE

What is a container, and how does CI/CD use it?

THE IDEA

What it is

An image packages an application and its filesystem dependencies. A container is a running instance with isolation supplied by the host environment. CI validates changes; a delivery pipeline promotes identified artifacts through release checks.

Why you need it

Packaging improves repeatability, but persistence, secrets, compatibility, and recovery still need a plan. The artifact tested in staging should be traceable to the one released.

How it works

  1. Build an artifact from a known revision and dependency set.
  2. Run checks against that artifact.
  3. Inject environment-specific configuration when appropriate.
  4. Release gradually, observe behavior, and retain a known recovery artifact.
Release record

Release evidence to record

source_revision: abc123
artifact_digest: sha256:<immutable digest>
checks: [unit, integration, smoke]
configuration_version: production-12
previous_artifact: sha256:<previous digest>
owner: release-on-call

This is a record format, not a deployable pipeline. Digests identify artifact content; mutable labels such as latest can refer to different content later.

Try the in-browser Linux CLI lab

Practice ls -la, chmod, grep | wc, df -h, df -i, du, lsof, and ss -tulnp against five live troubleshooting missions.

Open Linux CLI lab

Good practices and why

  • Keep persistent data outside disposable container filesystems and inject secrets through controlled mechanisms.
  • Coordinate application, configuration, and schema compatibility during rollout.

Common mistakes

  • Assuming rebuilding the same branch guarantees identical dependencies.
  • Assuming replacing an image also reverses a database migration.
GUIDED IMPLEMENTATION

Try it yourself

Draw a pipeline for a small API and show where tests, artifact identity, configuration, and rollback evidence are recorded.

What a successful result looks like

The diagram identifies the exact artifact at each stage and explains which state a rollback does not restore.

0 / 6000 characters · Saved on this device. Do not include passwords or private data.

Check your understanding

Which identifier most directly pins the image content being deployed?

Answer the understanding check correctly to record exercise completion.

PUT THE IDEA UNDER PRESSURE

Related interview practice

These scenarios add constraints and follow-up questions to the concepts you just learned.

Further reading

Selected primary references · reviewed 2026-10-09. Examples are educational; use your framework’s documented integration guidance when building a deployed system.

AlifBay Prep