Skip to content

feat: add support for tmpfs mounts in GenericContainer#65

Merged
shyim merged 2 commits into
testcontainers:mainfrom
wundii:feat/tmpfs-mounts
May 21, 2026
Merged

feat: add support for tmpfs mounts in GenericContainer#65
shyim merged 2 commits into
testcontainers:mainfrom
wundii:feat/tmpfs-mounts

Conversation

@wundii
Copy link
Copy Markdown
Contributor

@wundii wundii commented May 21, 2026

Summary

  • Adds withTmpfs(string $containerPath, string $options = 'rw,noexec') to GenericContainer and TestContainer interface
  • Configures tmpfs mounts via Docker HostConfig when creating containers
  • Includes integration test verifying tmpfs is mounted correctly

Test plan

  • Integration test testShouldSetTmpfs added — starts an Alpine container with a tmpfs mount and verifies it appears in /proc/mounts

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90dc166fe6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Container/TestContainer.php
Replaces `cat /proc/mounts` with `stat -f -c %T` to reliably check the
filesystem type, avoiding issues with large stream output in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shyim shyim merged commit 466bb96 into testcontainers:main May 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants