Skip to content

GenericContainer withFileSystemBind: creates a root owned directory/file #8871

@nicolasduminil

Description

@nicolasduminil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions