GenericContainer withFileSystemBind: creates a root owned directory/file

未关闭
#8,871 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, java
领域
devops, testing-qa

调研方向

从 GenericContainer.withFileSystemBind 开始,在使用 Docker 26.1.4 的 Ubuntu 22.04.4 上复现 READ_WRITE bind,并检查 root 所有的目录或文件是如何创建的。完成的标准是确定所有权是否可以跟随当前的非 root 用户,并通过回归测试验证该行为。

由索引模型根据 Issue 内容生成。

描述

type/bug
Module

Core

Testcontainers version

1.19.8

Using the latest Testcontainers version?

Yes

Host OS

Ubuntu 22.04.4 LTS

Host Arch

x86

Docker version
26.1.4
What happened?

Using the following statement:

new GenericContainer<>("...")
  ...
  .withFileSystemBind("...", "...", BindMode.READ_WRITE)
  ...;

creates a root:root directory/file while executed by a normal, non-root user.

Is there any way to avoid that and to create directories/files owned by the current user ?

Relevant log output

No response

Additional Information

No response

主要语言
Java
星标
8.8k
派生
2k
平均合并
5 天 21 小时
30 天内合并 PR
15

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

testcontainers/testcontainers-java 的其他 Issue

查看 testcontainers/testcontainers-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。