Containers make isolation possible, not automatic

Two automated builds run on the same shared machine, and an unrelated claims application starts failing whenever a pricing service finishes its work. The operations team moves the builds into containers, only to discover that both jobs still share a writable dependency folder. T…

A regional insurance company runs two automated builds on the same shared machine. The first belongs to a pricing service, where engineers are testing an update to a calculation library. The second belongs to a claims application and has nothing to do with pricing. Yet the claims tests begin failing after the pricing build runs. When operations restarts the shared runner, the claims tests pass again. The team calls it an intermittent failure. The pattern suggests something more specific: one job has left behind conditions that another job inherits.

The first repair proposal is to put every build inside a container. That could help, provided the team understands what the container separates and what remains shared. A container can give a job a defined view of its software and files. It does not automatically erase the security risks of a powerful host, make every dependency trustworthy, or guarantee a clean start when the team deliberately reuses data. The interesting question is which part of the earlier job crossed into the later one.

Start with what executes a pipeline. A runner is the machine or service responsible for performing a job. The job may execute directly on that machine, inside a container started there, or inside a more isolated temporary environment. These are different layers. Saying that a job uses a container tells us something about how its processes are packaged. It does not, by itself, tell us whether the host is dedicated, whether the job receives sensitive credentials, or whether two jobs share writable storage.

For a quieter comparison later, the AutoOps+ Study Guide published by Bare Metal Cyber gives you another way to think about a pipeline runner and the software environment inside its container. Use the example of the two insurance applications: identify what each job should receive at startup and which resources should remain inaccessible. The useful test is whether you can explain a possible contamination path, not whether you remember the name of a container setting.

A container image supplies a starting point for the processes in a container. It can include an operating-system user space, a language runtime, tools, libraries, and the application or test harness. The image is assembled in advance or during the pipeline, then a container is created from it. This is useful because a fresh container can begin with known dependencies instead of inheriting whichever utilities happen to be installed on the runner. The image describes an intended starting environment, while the actual running container can still create files and change state as the job proceeds.

On a typical Linux container host, containers share the host kernel. They can use operating-system features such as namespaces to separate views of processes, networking, and file systems, and control groups to constrain resource use. Those mechanisms provide meaningful isolation when configured appropriately. They are not identical to running every build inside a separate virtual machine with its own guest kernel. An operating-system vulnerability, excessive privilege, or unsafe host integration can weaken the boundary between the container and the machine beneath it.

At the insurance company, the team finds that each container mounts a common folder where earlier builds deposited temporary packages. The pricing build updated a library in that location. The claims build then loaded the updated library from the shared folder instead of the version expected by its own dependency record. Creating a new container did not help because both containers were intentionally given the same outside folder. The container's file system appeared fresh, but one of its important inputs was not.

A mount allows the container to reach files or storage made available by the host or another resource. That can be necessary for source code, build outputs, and test data. It also means isolation depends on what is mounted and whether it is writable. If two jobs share a directory containing temporary dependency files, one job can alter the other's effective environment. If a container is allowed to write to a sensitive host directory, a mistake or malicious process may change more than its own temporary files. The folder's purpose, access mode, and lifetime need to match the job's work.

The obvious fix is to give each application a separate working area and to avoid sharing writable dependency directories between unrelated jobs. That is only part of the decision. A build cache can safely save time when the system associates cached results with the inputs that produced them. A poorly designed cache can return stale or contaminated results, especially when cache keys ignore relevant dependency versions or allow less trusted jobs to contribute to data used by privileged jobs. The team should distinguish a performance cache from the authoritative record of a tested artifact.

Another proposed shortcut is to let every container control the host's container engine. That would make it easy for a build to start other containers. It would also grant a much more powerful capability than running a compiler inside a container. Control of a Docker daemon can allow a process to create containers with broad access to host resources, depending on how the daemon is configured. For an untrusted build, that access can turn a small isolation mistake into host compromise. The fact that the controlling process lives inside a container does not make its authority harmless.

The company considers privileged containers because one integration test needs unusual access to a network interface. Privileged execution expands what a container can do. It is not a routine remedy for a permissions error. The first response should be to identify the specific capability the test requires and decide whether the test can run in a separate, tightly controlled environment. A deliberately isolated specialist job may be appropriate. Granting that ability to every build makes every code contribution and dependency a possible route to more authority.

Here is a different form of contamination. A runner has credentials that permit access to an internal package repository. The pipeline starts a container and passes those credentials to every job, including tests of proposed changes from people who are not authorized to publish packages. The container might keep one test's ordinary files apart from another, but a process inside it can still use any credential that has been handed to that process. A boundary that allows the secret through is not a boundary around the secret.

The Bare Metal Cyber Academy's AutoOps+ transcripts are a useful optional reference for comparing these execution arrangements at a slower pace. Focus on what is inherited by a job: the image, mounted files, network paths, identities, and access to the host. When you can distinguish a clean software environment from an authorized and isolated execution environment, a difficult pipeline scenario becomes easier to reason through.

An image itself needs scrutiny. Suppose a team chooses a familiar image tag and assumes the tag permanently identifies the same content. Tags are convenient names, but image references can be updated. A later job may pull different underlying bytes under the same tag. When reproducibility or provenance requires exact identity, the team can select a specific image digest and record that choice with the source revision, dependencies, and resulting artifact. That does not prove the image is safe. It makes the intended image verifiable and prevents an unnoticed tag change from silently altering what the job starts with.

Image provenance and vulnerability management answer different questions. A digest establishes which image was selected. It does not say who should be trusted to produce it, whether its packages contain vulnerabilities, or whether those vulnerabilities are exploitable in this use. Teams may restrict image sources, review base-image updates, scan relevant components, and rebuild when the underlying software needs remediation. Freezing an outdated image indefinitely can preserve one form of reproducibility while allowing its security risk to grow. A controlled update should change the recorded identity and trigger the checks appropriate to the change.

The operations team now has to decide whether two jobs should share a runner at all. A persistent self-hosted runner can accumulate information and modifications across jobs unless its operator has engineered reliable cleanup and separation. For low-trust code, a disposable runner or dedicated temporary virtual machine can create a stronger boundary than repeatedly reusing a long-lived host. Even a one-job runner still requires secure provisioning, approved images, restricted credentials, and safe disposal of its storage. Temporary is a useful property, not a security verdict.

Consider an ordinary test of a trusted internal service. A container started from a reviewed image, with limited network access and separate temporary storage, may be an efficient choice. Now change the condition: the test runs code submitted through a public contribution. The code may be intentionally hostile, and its dependencies may be able to execute arbitrary steps during installation. On a shared persistent runner that can reach internal systems, the same container layout may be inappropriate. Trust in the code and the runner's reach should influence the isolation design.

Build outputs create another deliberate crossing point. The team wants a compiled package from one job to become the input to security tests and then to release preparation. It should transfer that package as a named artifact with a known source revision and integrity information. The downstream job should verify it received the intended result rather than rebuild casually from whatever is now in a shared folder. The artifact becomes evidence of the particular build under review. Its transfer can be explicit without granting the next job access to every temporary file left by the first.

Network separation deserves the same attention. The claims test may need a mock payment service, while the pricing build needs an internal package registry. Neither automatically needs broad access to production databases or administrative interfaces. A container can have a separate network view and still reach whatever the surrounding configuration permits. The team should specify the necessary destinations and protect higher-trust services independently. If the runner's network has unrestricted reach, a process inside a container may inherit a dangerous opportunity even if its file system is clean.

Resource limits also support reliability. One build can consume so much memory, disk space, or processor time that unrelated jobs fail even without sharing a library. Containers can be configured with resource limits, but the host has finite capacity. Jobs should receive enough resources for valid tests and be subject to sensible constraints so that a runaway workload does not take down the runner. A failing job that exhausts disk space can disrupt the next job before either application reaches its own tests.

At the insurance company, the repair is deliberately narrower than a slogan about containerization. The team gives each job a controlled image, eliminates the shared writable dependency folder, and sets cache rules that do not allow one project to supply another project's trusted inputs. It moves less trusted work to short-lived runners without privileged access to the host engine. It limits the credentials and network destinations provided to each job. The package that passes testing is stored and identified so later stages can receive the same artifact.

The team also tests the repair under the conditions that exposed the original problem. It runs the pricing build and claims build in both orders. It deliberately changes a dependency in one workspace and checks that the other remains unaffected. It verifies that a job cannot modify a protected host location, access an unnecessary credential, or leave work behind for the next execution. A fresh container that looks clean is not enough evidence. The test needs to show that the intended boundaries hold when a job tries to cross them.

One final limitation is easy to overlook. A container image built from well-specified inputs can help reduce differences between environments, but it does not guarantee identical results in every circumstance. Time, outside services, processor architecture, variable dependencies, and the behavior of tests can still affect a build. Likewise, a container that successfully isolates two development jobs does not become a general-purpose security sandbox for any code someone may submit. The claim should be proportional to what the team actually designed and tested.

When the claims tests finally become reliable, the important achievement is not that every task now has the word container attached to it. The team has identified the crossing points between jobs and made each one intentional. Software dependencies start from a controlled image. Shared storage and caches have defined purposes. Host privileges and network access are constrained. Tested artifacts move forward without silently changing identity. Containerization gave the team useful isolation mechanisms; sound pipeline design decided whether those mechanisms protected the right things.

Containers make isolation possible, not automatic
Broadcast by