Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Update docs
Tereza Tizkova0672d7af9152
diff --git a/apps/docs/src/app/sandbox/templates/start-cmd/page.mdx b/apps/docs/src/app/sandbox/templates/start-cmd/page.mdxindex a98ff55ff..4524aa542 100644--- a/apps/docs/src/app/sandbox/templates/start-cmd/page.mdx+++ b/apps/docs/src/app/sandbox/templates/start-cmd/page.mdx@@ -4,19 +4,28 @@ This way, you can for example have running servers or seeded databases inside thThe idea behind the start command feature is to lower the wait times for your users and have everything ready for your users when you spawn your sandbox.++## How to add start command++When you are building a sandbox template you can specify the start command by using the [`-c`](/cli/commands#build) option:++```bash+e2b build -c "<your-start-command>"+```++When you spawn the custom sandbox you built, the start command will be already running if there was no error when we tried to execute it.++## How it works-When building a custom sandbox, we create a container based on your [`e2b.Dockerfile`](/sandbox/templates/template-file) file.+Every time you are building a [custom sandbox](/guide/custom-sandbox), we create a container based on the [`e2b.Dockerfile`](/sandbox/templates/template-file) file you create in the process.We extract the container's filesystem and start a sandbox with this extracted filesystem.-We call this sandbox a _template sandbox_. Now two things can happen depending whether you specified the start command or not.+We call this sandbox a _template sandbox_.-- **If you don't specify the start command**- 1. we take the running template sandbox- 1. snapshot it and make it ready for you to spawn it with the SDK+Then, these steps happen:-- **If you do specify the start command**1. we take the running template sandbox- 1. **execute the start command and wait 15 seconds**- 1. snapshot it and make it ready for you to spawn it with the SDK+ 2. (Only if you specified the start command, otherwise this step is skipped) **execute the start command and wait 15 seconds**+ 3. snapshot it and make it ready for you to spawn it with the SDK.<Note title="Sandbox Snapshot">@@ -31,16 +40,6 @@ This allows us to load the sandbox in a few hundred milliseconds any time later- We wait 15 seconds after we execute the start command before we snapshot the sandbox.-## How to add start command--When you are building a sandbox template you can specify the start command by using the [`-c`](/cli/commands#build) option:--```bash-e2b build -c "<your-start-command>"-```--When you spawn the custom sandbox you built, the start command will be already running if there was no error when we tried to execute it.-## LogsYou can retrieve the start command's logs using the SDK during runtime: