Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Testcontainers and Docker-based tooling depend on a container runtime on every developer machine. What risks does this bring to an organisation over the years, and how would you manage them?

Depending on a container runtime on every laptop brings three long-term risks: the runtime's licensing and support terms can change, corporate security rules can restrict running containers locally, and image supply can break through registry limits or changes in public images. We manage them by keeping alternatives ready, such as other Docker-compatible runtimes and remote container hosts, by pinning image versions and pulling through an internal registry mirror, and by reviewing the dependency regularly with security and procurement.

Why this question is asked

Once Testcontainers, Docker Compose support and container-based builds become standard, every developer machine needs a container runtime to do any work. That is a quiet but deep dependency: if it disappears or changes terms, hundreds of engineers cannot run their tests. This has already happened in a mild form, when Docker Desktop moved to paid subscriptions for larger companies in 2021 and many organisations had to decide quickly whether to pay or switch. Interviewers ask this leadership question to see whether we can spot such dependencies and manage them before they become a crisis. In this answer, we will look at the licensing and support risk, the security risk, the image supply risk, the alternatives to keep ready, and how to review the dependency over time.

1Why This Dependency Is Different

Most dependencies are libraries that we can pin in a build file and upgrade on our own schedule. A container runtime is different. It is installed software on every machine, often with its own licence and updates, it needs elevated privileges, and our tooling talks to it through an API, usually the Docker Engine API, that the tooling assumes is available.

So the risks are less about our code and more about the environment our code needs. They are the kind of risks that are invisible for years and then affect everyone at once.

Step throughWhat a container-based test run depends on
  1. Our testsTestcontainers, Docker Compose support
  2. Docker-compatible APIthe contract our tools use
  3. Container runtime on the laptoplicence, support, updates, privileges
  4. Image registrypublic hub, rate limits, image changes
  5. Company policysecurity rules for laptops and CI

5 layers, from the top down. Step through them one at a time.

Each layer below our tests can change without any change in our code.

2Licensing and Support Terms Can Change

The runtime that developers install is a product with its own terms. Free desktop editions can become paid for companies above a certain size, prices can change, and features can move between tiers. Support contracts may end, or a product may be discontinued. Even the tools around it change hands; the Testcontainers project itself is now stewarded by a company, Docker, that also sells a runtime.

The way to manage this is not to avoid commercial products but to keep a choice. We make sure our tooling depends only on the Docker-compatible API, not on one product's extra features, and we check periodically that at least one alternative, such as Podman, Rancher Desktop or Colima, still runs our full test suite. Then a change of terms becomes a pricing negotiation, not an emergency.

3Security Rules May Restrict Containers on Laptops

Security teams have good reasons to be wary. Access to the Docker socket is effectively administrator access to the machine, containers can run unvetted images from the internet, and Testcontainers by default starts a helper container, Ryuk, that needs access to the socket to clean up. A new security policy, a move to locked-down laptops, or a regulated project can suddenly forbid local containers.

We prepare by working with security early instead of waiting for a ban. Rootless runtimes reduce the privilege problem. An approved list of base images and an internal registry reduce the unvetted-image problem. And a remote option, where containers run on a managed host rather than the laptop, means a strict policy does not stop work.

4Images Can Break or Disappear

Our tests also depend on images. Public registries apply pull rate limits, which can fail CI builds at busy times. Tags like postgres:latest change under us, so a test that passed yesterday fails today for no reason in our code. Images can be removed, renamed or move to a different publisher.

Two habits remove most of this risk. We pin image versions, ideally to a specific tag and, for critical images, to a digest. And we pull through an internal registry mirror, which caches images inside the company, avoids rate limits and keeps working if an upstream image disappears. Testcontainers supports this with an image name prefix or substitutor setting, so code can keep writing postgres:17 while the pull goes to the mirror; check the documentation for the exact property in your version.

Java
# ~/.testcontainers.properties or src/test/resources/testcontainers.properties
hub.image.name.prefix=registry.internal/mirror/
// Code still says:
new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.6"));
// Pulled as: registry.internal/mirror/postgres:17.6 (pinned, cached, no rate limit)

5Alternatives and the Review Cycle

Keeping alternatives ready means more than knowing they exist. We maintain a short, tested list: at least two local runtimes that our tools work with, and a remote container host, such as a shared build host reached through DOCKER_HOST or a cloud container service, for machines that cannot run containers at all. A CI job runs the test suite against each alternative every month, so we find incompatibilities early.

Then we review the whole dependency once or twice a year with security and procurement: licence costs and terms, contract renewal dates, any new security requirements, registry usage, and the results of the alternative-runtime jobs. The review produces a short written decision, even if the decision is that nothing changes.

Risks and how we manage them
RiskEarly warningMitigation
Licence or support terms changevendor notices, renewal datesAPI-only use, tested alternative runtimes
Security restricts local containersnew policies, auditsrootless runtime, remote container host
Image pulls fail or images changerate-limit errors, flaky testspinned versions, internal registry mirror
Tooling ownership changesproject announcementswatch roadmap, keep code on standard APIs

6Follow-up questions

Should we stop depending on containers to remove the risk?

No. Containers give us realistic tests and fast local setup, and the alternatives, such as in-memory databases or shared test servers, are less faithful and often slower. The goal is to make the dependency manageable, with choices and early warnings, not to remove it.

Who should own this dependency?

A platform or developer-experience team, with a named owner. They track the runtime's terms, maintain the mirror and the list of alternatives, run the compatibility jobs, and organise the yearly review with security and procurement. Without an owner, the dependency is discovered only when it breaks.

How would you handle a sudden licence change with a short deadline?

First, check the contract and the real deadline; vendors usually give a grace period. Then use the tested alternative for the developers who can switch quickly, buy licences for a transition period where switching takes longer, and set a migration date. Because our tooling depends only on the standard API, the switch is mostly installation work.

7Conclusion

In this answer, we saw that a container runtime on every developer machine is a deep, long-lived dependency. Its licensing and support terms can change, security policies can restrict local containers, and image supply can break through rate limits or changed tags. We manage this by using only the Docker-compatible API, keeping tested alternative runtimes and a remote container host ready, pinning image versions behind an internal registry mirror, and reviewing the dependency regularly with security and procurement.

What to say in the interviewAbout 80 seconds aloud

Open with

Once Testcontainers and Docker Compose support are standard, every laptop needs a container runtime to run tests, so I treat the runtime as a strategic dependency with an owner.

Then, if they want more

I see three risks. First, licensing and support can change; we saw that when Docker Desktop became paid for larger companies. I manage it by making sure our tools use only the Docker-compatible API and by keeping at least one alternative runtime, like Podman or Rancher Desktop, tested against our suite in a monthly CI job.

Second, security may restrict containers on laptops, since socket access is close to root. I would work with security early, prefer rootless runtimes, and offer a remote container host so a strict policy does not stop work.

Third, images: public registries have rate limits and floating tags change, so we pin versions and pull through an internal registry mirror, which Testcontainers supports with an image name prefix.

Finally, once or twice a year I would review the whole thing with security and procurement: costs, renewal dates, new policies, mirror usage, and the alternative-runtime results, and write down the decision. That way a change of terms is a negotiation, not a crisis.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Spring Boot reference
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Testcontainers and Docker-based tooling depend on a container runtime on every developer...": https://scrivio-interview-library.netlify.app/spring-boot/developer-experience/272e978f29/