From efad01e07a043bac005c25fcfd1447dcf6971efd Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Wed, 25 Feb 2026 11:37:40 -0800 Subject: [PATCH] Fix docs regarding custom Docker setup for sandboxes --- src/content/docs/sandbox/configuration/dockerfile.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/docs/sandbox/configuration/dockerfile.mdx b/src/content/docs/sandbox/configuration/dockerfile.mdx index 16f79825cbf..06612260e3d 100644 --- a/src/content/docs/sandbox/configuration/dockerfile.mdx +++ b/src/content/docs/sandbox/configuration/dockerfile.mdx @@ -137,10 +137,11 @@ COPY my-app.js /workspace/my-app.js COPY startup.sh /workspace/startup.sh RUN chmod +x /workspace/startup.sh -ENTRYPOINT ["/sandbox"] CMD ["/workspace/startup.sh"] ``` +The base image already sets the correct `ENTRYPOINT`, so you only need to provide a `CMD`. The sandbox binary starts the HTTP API server, then spawns your `CMD` as a child process with proper signal forwarding. + ```bash title="startup.sh" #!/bin/bash @@ -156,7 +157,7 @@ wait ``` :::note[Legacy startup scripts] -If you have existing startup scripts that end with `exec bun /container-server/dist/index.js`, they will continue to work for backwards compatibility. However, we recommend migrating to the new approach using `ENTRYPOINT ["/sandbox"]` with `CMD` for your startup script. +If you have existing startup scripts that end with `exec bun /container-server/dist/index.js`, they will continue to work for backwards compatibility. However, we recommend migrating to the new approach using `CMD` for your startup script. Do not override `ENTRYPOINT` when extending the base image. ::: ## Related resources