---
title: "Streamlining Local Development with Dev Containers and Testcontainers Cloud"
description: "Testcontainers-based tests and services can run inside a dev container by giving the container Docker access, either through the Docker-in-Docker feature or by swapping in the Testcontainers Cloud feature, which runs an agent that points Docker calls at a remote cloud environment."
url: "https://swe.quest/articles/streamlining-local-development-with-dev-containers-and-testcontainers-cloud-050962d8604171c1"
canonical: "https://www.docker.com/blog/streamlining-local-development-with-dev-containers-and-testcontainers-cloud/"
source: "Docker"
published: "2024-08-27"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["containers","testing","developer-tools","jvm"]
---

# Streamlining Local Development with Dev Containers and Testcontainers Cloud

A post on [Docker](https://swe.quest/sources/docker.md), published 2024-08-27, 7 min read, How-to. Original: [https://www.docker.com/blog/streamlining-local-development-with-dev-containers-and-testcontainers-cloud/](https://www.docker.com/blog/streamlining-local-development-with-dev-containers-and-testcontainers-cloud/)

## Summary

Testcontainers-based tests and services can run inside a dev container by giving the container Docker access, either through the Docker-in-Docker feature or by swapping in the Testcontainers Cloud feature, which runs an agent that points Docker calls at a remote cloud environment. A walkthrough using IntelliJ's Dev Containers plugin and a Spring Boot Java 21 workshop repo shows both devcontainer.json configurations. The Testcontainers Cloud setup passes a TC\_CLOUD\_TOKEN via an env file kept out of git, sets TCC\_PROJECT\_KEY to group sessions, and is checked through the agent log. Moving to Testcontainers Cloud is pitched as avoiding Docker-in-Docker's security concerns and local resource load.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)

## Prerequisites

- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Testcontainers
- Java/Maven projects ([easy posts on Java & JVM](https://swe.quest/tags/jvm.md?difficulty=easy))

## Keywords

Dev Containers, Testcontainers, Testcontainers Cloud, devcontainer.json, Docker-in-Docker, IntelliJ IDEA, Spring Boot

## Related posts

- [Why Testcontainers Cloud Is a Game-Changer Compared to Docker-in-Docker for Testing Scenarios](https://swe.quest/articles/why-testcontainers-cloud-is-a-game-changer-compared-to-docker-in-docker-for-206c0ecf09c497e2.md): Docker · 2024-11-14 · Medium · 8 min read · Testing, CI/CD, Containers
  Docker-in-Docker, commonly used to give CI jobs a Docker daemon for Testcontainers integration tests, requires privileged mode and nests storage drivers, cgroups and namespaces, which leads to security audit problems, flaky builds, slow pipelines and hard debugging.
- [Run Your Project in a Dev Container, in Zed](https://swe.quest/articles/run-your-project-in-a-dev-container-in-zed-4ba65af5822b4f8c.md): Zed · 2026-01-07 · Medium · 5 min read · Developer tools, Containers, Developer productivity
  Zed v0.218 can open projects inside Dev Containers defined by \`.devcontainer/devcontainer.json\`, giving teams reproducible development environments.
- [Functional tests with Testcontainers](https://swe.quest/articles/functional-tests-with-testcontainers-8e8bddfb01d0b1bc.md): Zalando Engineering · 2022-04-11 · Medium · 7 min read · Testing, Java & JVM, Containers
  Black-box functional tests for a Spring service can run against the service packaged as a Docker image, with PostgreSQL and other dependencies started as separate containers via Testcontainers.
- [Develop Kubernetes Operators in Java without Breaking a Sweat](https://swe.quest/articles/develop-kubernetes-operators-in-java-without-breaking-a-sweat-89f0aefdc48d05fa.md): Docker · 2024-06-06 · Medium · 8 min read · Kubernetes, Testing, Java & JVM, Containers
  Kindcontainer, a Testcontainers extension, enables integration testing of Java-based Kubernetes operators and controllers against real API servers running in Docker.
- [Highlights from AWS re:Invent: Supercharging Kiro with Docker Sandboxes and MCP Catalog](https://swe.quest/articles/highlights-from-aws-re-invent-supercharging-kiro-with-docker-sandboxes-and-mcp-a18d4753910b06e8.md): Docker · 2025-12-12 · Medium · 7 min read · AI agents, Sandboxing & isolation, Containers, AI for coding
  Docker Sandboxes run coding agents like AWS's Kiro inside isolated containers that see only the project directory and none of the host's credentials, while the Docker MCP Toolkit supplies tools through a gateway that injects secrets only into the specific MCP server that needs them.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
