Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to local file system inside Docker container? #148

Open
mikegehard opened this issue Dec 10, 2024 · 2 comments
Open

Access to local file system inside Docker container? #148

mikegehard opened this issue Dec 10, 2024 · 2 comments
Labels
question Further information is requested

Comments

@mikegehard
Copy link

I quickly looked through the docs but could find the answer so thought I'd ask here. If there is a better place, let me know.

I'm working to implement a human in the loop AI assisted TDD flow using Claude desktop and MCP servers: mikegehard/ai-assisted-agile-development#14

I'm at the point where I need to allow Claude to run commands locally and I wanted to use Docker containers for isolation from my local machine: mikegehard/ai-assisted-agile-development#13 (comment)

I was thinking about writing an MCP server but couldn't figure out how to attach the local file system into the container: mikegehard/ai-assisted-agile-development#14 (comment)

Do y'all have any docs that would show how that works? I'm guessing I could just include a Dockerfile in my project to build the container with a volume mount but thought I'd ask.

Thanks!

@klieret
Copy link
Member

klieret commented Dec 10, 2024

Hi @mikegehard ! Not sure if I understand your question completely, but it sounds like you're trying to mount local folders into the docker container? (like with bind mounts)?

With swe-rex Docker deployment (see the config docs), you should be able to just pass your arguments.

So I think something like this:

docker_config = DockerDeploymentConfig(
	image="...",
	docker_args=["--mount type=bind,src=<host-path>,dst=<container-path>"]
)

or similarly with volume and then

deployment = DockerDeployment.from_config(docker_config)

Does that answer your question?

@klieret klieret added the question Further information is requested label Dec 10, 2024
@mikegehard
Copy link
Author

Yes I want to mount a local directory into the Docker container so that I can run commands against my project source code.

I'll give this a try and update the docs to include instructions if it work out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants