OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Document a minimal available sandbox Dockerfile

Open luochen1990 opened this issue 6 months ago • 3 comments

Hi, I want to build my own sandbox docker image, but failed because commands not found, so I wonder, what is the complete set of commands required by OpenHands to be run as a sandbox.

A Dockerfile example build from scratch will be best.

luochen1990 avatar Jun 14 '25 13:06 luochen1990

Maybe it would be helpful to specify what's missing from this documentation? A complete example? https://docs.all-hands.dev/usage/how-to/custom-sandbox-guide

matty-fortune avatar Jun 15 '25 18:06 matty-fortune

I noticed that the most important part in this document is:

  1. Debian based
  2. replace SANDBOX_RUNTIME_CONTAINER_IMAGE into SANDBOX_BASE_CONTAINER_IMAGE.

The first question: is these two point enough, is there anything else to be noticed ?

And the second: does using SANDBOX_BASE_CONTAINER_IMAGE means OpenHands needs to install dependencies at runtime startup, what happens behind the scenes?

The third: what if we want to build a SANDBOX_RUNTIME_CONTAINER_IMAGE to accelerate the runtime startup, what should be installed by ourself ?

luochen1990 avatar Jun 16 '25 00:06 luochen1990

Someone else might be able to provide more details, but (1) yes, that should be enough, (2) yes, dependencies are installed in the container so that OpenHands can use it, and (3) I don't think anything can be done within the custom sandbox to accelerate the runtime startup since that's managed by OpenHands, you can only try to keep your custom sandbox as light as possible given what it's supposed to support.

matty-fortune avatar Jun 18 '25 18:06 matty-fortune

Thank you for your response, this has answered many of my questions. I will close this issue, but if anyone knows how to build a non-Debian-based runtime image from scratch, please feel free to comment.

luochen1990 avatar Jun 25 '25 04:06 luochen1990