Nine ContainerOps Habits Worth Adopting, With a Quick Check for Each

Nine ContainerOps Habits Worth Adopting, With a Quick Check for Each

Operations teams like short lists because short lists get done. Here are nine habits that form the everyday core of ContainerOps, ordered roughly by how much protection they give per hour of effort. Each entry states the habit, the reason for it and a quick way to check that you have it right.

The framing is the Ops Atlas’s. It uses ContainerOps as a label for the care of single containers and their images and registries, below the orchestration layer, and notes that the label is not an industry standard. The source page, the Atlas article on ContainerOps, sets out the full scope and the supporting numbers.

1. Deploy by digest and keep release tags immutable

Production should run exactly one known build. A digest identifies it unambiguously, while an immutable release tag gives people a readable name that never moves. Check: pick any running container and name the digest it came from within a minute.

2. Let a bot move your base images

Pinned references are only safe when something updates them. Tools such as Renovate or Dependabot open pull requests when newer bases appear. The Atlas stresses that pinning does not block fixes in that arrangement. Check: look at the age of your oldest base image.

Habits one and two work as a pair. Pinning gives you control, the bot gives you currency, and review keeps a human between a new base image and production.

3. Ship a minimal final stage

Multi-stage builds leave compilers and caches behind. The Atlas cites a distroless static image of roughly 2 MiB as an illustration of how little a final stage can contain. Check: list what is inside the final image and ask whether each part is needed at runtime.

Smaller images also pull faster and leave less for an attacker to use, which makes this one of the few habits that improves speed and safety together.

4. Run as non-root, drop capabilities, mount the root read-only

This trio shrinks what a compromised process can do. The Atlas uses a numbered user such as 65532 as an example and lists dropping every capability as standard practice. Neither the Docker socket nor the privileged flag belongs in this picture, since both amount to machine-level access. Check: inspect a container and read its user, capabilities and filesystem mode.

Plan the change on a test copy first, because some programs write to directories they should not and will fail loudly once the root filesystem is read-only. Fix those paths with a dedicated writable volume.

5. Always set memory and process limits

Without them, one runaway container can starve its neighbours. Take care with processor caps, since throttling can hurt latency without raising a visible alarm. Check: compute throttled periods divided by total periods; the Atlas suggests staying under 5 percent for latency-sensitive services.

Pick a memory figure from observation instead of guesswork, and leave modest headroom. A limit set too tight produces out-of-memory kills, which the Atlas suggests counting per 1,000 container-days to see whether limits are realistic.

6. Use the exec form and test a stop

If a shell sits in front of your program, a stop request may never arrive, and the container will be killed after the grace period with exit code 137. Check: restart a test container and watch whether the program logs a clean shutdown.

This habit is also a courtesy to users. A clean shutdown lets in-flight requests finish, so a routine release does not show visitors an error page.

7. Publish ports deliberately

A port mapping without an address listens on every interface, and it may bypass your host firewall. Bind to the loopback address for private services and use internal networks between containers. Check: scan your own host from another machine and compare what answers to what you intended.

Teams are often surprised by this one, because they assume the host firewall is in the path. The Atlas notes that published ports are handled before those rules apply, and Docker itself describes the default as insecure.

8. Rotate logs and apply retention

The default json-file driver has no rotation, so logs can slowly fill a disk. Registries have the same property: the Atlas’s example of 40 services, 25 builds a week, two platforms and 15 MiB each adds roughly 29 GiB weekly before any clean-up. Check: look at the largest log file on the host and the oldest untagged image in the registry.

Put both settings into your templates so new services inherit them. Retention policies in a registry are typically paired with garbage collection, which is what actually reclaims the space.

9. Rebuild instead of patching in place

Opening a shell in a running container to change a file leaves no record and disappears at the next restart. The Atlas lists exec-based patching as an anti-pattern, and observes that scanning without a quick rebuild produces “a list, not a fix”. Check: measure how long a base-image fix takes to reach production, a number the Atlas names as fix-to-production time.

A fast rebuild also helps when a runtime flaw is announced. The Atlas cites two runc breakout issues, from January 2024 and November 2025, as examples of why a short path from fix to production matters.

What to drop from the list if you are short of time

If you must cut, keep the first, fourth and fifth. They require the least tooling and protect against the most common failures: ambiguous builds, over-privileged processes and resource starvation. The remaining habits are cheap to adopt in turn, but they need a calendar entry to survive a busy month.

Where these habits sit in operations as a whole

These habits are the foundation for wider operations work. If you are building out monitoring and response practices, our guide to faster incident resolution with AIOps assumes that the containers underneath behave predictably, and a practical AIOps roadmap for operations teams is the natural continuation. The Atlas keeps log pipelines and observability outside ContainerOps, so treat the two as adjacent areas.

How to use the list

Do not try to adopt all nine at once. The Atlas’s own ninety-day plan front-loads inventory, logging defaults, a mirror and linting in warning mode, then moves to digests, update bots and non-root settings for the ten most important services, and finally to blocking lint rules and a fix-to-production deadline. Treat items 1, 4 and 5 as your first sprint, items 6 to 8 as your second, and items 2, 3 and 9 as the third.

Finish by writing down who owns each container. The Atlas observes that estates without owners age quietly, and none of the nine habits survives without a person who remembers to apply it.

A one-page scorecard

To turn the list into something a manager can follow, give each habit a simple status of not started, partly done or done, and review the sheet monthly. Add the three numbers the Atlas proposes for tracking progress: what fraction of production images are pinned by digest, the age of the oldest base image, and the time a fix takes to reach production. Five of the Atlas’s ladder levels sit behind this sheet, running from laptop builds at the bottom to automated rebuilds with sandboxed runtimes at the top, and most teams will find that a calm, honest scorecard at the middle rungs is a far better outcome than a heroic push toward the top that fades by the next quarter.

Review the scorecard with the people who own the containers, not for them. Habits survive when the people applying them helped choose the order.