Feature: Temporary file volume mapping to dynamically generate generate the file content

Open
#937 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, python

Research direction

Start at the DockerContainer volume-mapping entry point and compare its existing mount handling with the linked .NET copying-files example. Add an API for generated file content to be available at a requested container path, and add coverage showing the resulting volume mapping works.

Written by the indexing model from the issue text.

Description

🚀 enhancement

What are you trying to do?

Add a method to DockerContainer to dynamically add volume mappings

Why should it be done this way?

In memory dynamic volume bindings are incredibly useful, there are many use cases where you may want to dynamically generate file contents, and bind them to a container. Configuration is the core example

Other references:

This already exits in the .NET implementation, as an example https://dotnet.testcontainers.org/api/create_docker_container/#copying-directories-or-files-to-the-container

Would you like to implement a fix?

Yes

Dominant language
Python
Stars
2.3k
Forks
397
Avg merge
8d 16h
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from testcontainers/testcontainers-python

All issues in testcontainers/testcontainers-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.