testcontainers / testcontainers/testcontainers-go

[Enhancement]: Allow running containers with read only root filesystem (`--read-only`)

Open
#2,803 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
5k
Forks
637
Avg merge
2d 12h
Merged PRs (30d)
26

Description

Proposal

I find testcontainers very useful to run integration tests in environments that are closer to production. One of the things I typically have in production are containers with read-only root filesystem, either through Kubernetes' readOnlyRootFilesystem: true, or through Docker's --read-only.

It would be great if this configuration could be replicated in testcontainers, as it can help catch bugs that other tests do not see: namely, the application trying to write to places where it shouldn't be able to.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing how testcontainers-go exposes Docker container run configuration, then identify where the --read-only setting belongs and inspect existing container-option tests. Done means callers can request a read-only root filesystem and the behavior is covered by a focused test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
infrastructure, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.