brief-furniture-5566
08/18/2025, 5:36 AMCreate Your Docker Image approach described in
https://github.com/All-Hands-AI/OpenHands/blob/main/docs/usage/how-to/custom-sandbox-guide.mdx
with the goal of implementing a custom execution environment in OpenHands:
1.First, write a Dockerfile.
FROM nikolaik/python-nodejs:python3.12-nodejs22
RUN mkdir -p /workspace/data
RUN pip install --no-cache-dir requests pandas
2.Build the image.
docker build -t ghcr.io/all-hands-ai/runtime:oh_v0.51.1_custom-image_demo .
It worked.
3.Modify config.toml — in my case, config.toml only contains the following content:
[sandbox]
base_container_image="custom-image_demo"
4.Start with DEBUG=1 make run.
It can be seen that it detected the image I specified.However, the following error occurred:brief-furniture-5566
08/18/2025, 5:40 AMwooden-umbrella-84098
08/18/2025, 5:00 PMdocker build -t custom-image_demo .wooden-umbrella-84098
08/18/2025, 5:01 PMbrief-furniture-5566
08/19/2025, 12:53 AMcustom-image_demo, because I found that the latter would cause the make run command to fail to detect the image:
docker build -t ghcr.io/all-hands-ai/runtime:oh_v0.51.1_custom-image_demo .
Furthermore, when executing make run, the log indicated that my custom image was detected. However, unfortunately, an error occurred later:wooden-umbrella-84098
08/19/2025, 3:01 PMwooden-umbrella-84098
08/19/2025, 3:01 PM