OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Adds the ability to pass docker.sock into the sandbox

Open tholum opened this issue 9 months ago • 2 comments

  • [x] This change is worth documenting at https://docs.all-hands.dev/
  • [x] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality that this introduces. Adds an environment variable to allow you to pass /var/run/docker.sock into the sandbox, Which allows it to build and run docker images


Give a summary of what the PR does, explaining any non-trivial design decisions. This pr adds -v /var/run/docker.sock:/var/run/docker.sock to the sandbox If the environment variable SANDBOX_DOCKER_SOCKET_ENABLED=true is passed in,

Default's to not passing it though, but enables an advanced user the ability to pass it in, Which greatly increases the sandboxes capabilities, With a simple custom sandbox model, that installs docker and docker compose, this allows openhands to run docker compose instances, which opens up things like, Running a dev environment with a database, ext...


Link of any specific issues this addresses.

tholum avatar Mar 22 '25 05:03 tholum

Hmmm I don't fully understand what is happening here but we don't add things to the main README unless they are critical for functionality. CC @enyst and @rbren any thoughts on this?

mamoodi avatar Mar 22 '25 14:03 mamoodi

Yeah lets revert the readme changes.

We can add some docs to the Docker Runtime docs here though: https://docs.all-hands.dev/modules/usage/runtimes#docker-runtime

rbren avatar Mar 22 '25 16:03 rbren

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 01 '25 02:05 github-actions[bot]

This PR was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar May 10 '25 02:05 github-actions[bot]