Skip to content

Commit e3e9d38

Browse files
authored
Add page about start command (e2b-dev#566)
This PR adds a page in docs explaining details about the start command
2 parents e8e4cab + 0e6610e commit e3e9d38

File tree

2 files changed

+19
-4
lines changed
  • apps/web/src

2 files changed

+19
-4
lines changed

apps/web/src/app/(docs)/docs/legacy/sandbox/templates/start-cmd/page.mdx apps/web/src/app/(docs)/docs/sandbox-template/start-cmd/page.mdx

+15-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The idea behind the start command feature is to lower the wait times for your us
77

88
## How to add start command
99

10-
When you are building a sandbox template you can specify the start command by using the [`-c`](/docs/cli/commands#build) option:
10+
When you are building a sandbox template you can specify the start command by using the [`-c`](/docs/sdk-reference/cli/v1.0.9/template#e2b-template-build) option:
1111

1212
```bash
1313
e2b build -c "<your-start-command>"
@@ -17,7 +17,7 @@ When you spawn the custom sandbox you built, the start command will be already r
1717

1818

1919
## How it works
20-
Every time you are building a [custom sandbox](/docs/guide/custom-sandbox), we create a container based on the [`e2b.Dockerfile`](/docs/sandbox/templates/template-file) file you create in the process.
20+
Every time you are building a [custom sandbox](/docs/sandbox-template), we create a container based on the [`e2b.Dockerfile`](/docs/sandbox-template#3-customize-e2b-dockerfile) file you create in the process.
2121
We extract the container's filesystem and start a sandbox with this extracted filesystem.
2222
We call this sandbox a _template sandbox_.
2323

@@ -36,12 +36,16 @@ This allows us to load the sandbox in a few hundred milliseconds any time later
3636

3737

3838
## Limits
39-
- The network isn't accessible when running the start command.
39+
- The network isn't accessible when running the start command during the build phase.
4040
- We wait 15 seconds after we execute the start command before we snapshot the sandbox.
4141

4242

4343
## Logs
44-
You can retrieve the start command's logs using the SDK during runtime:
44+
You can retrieve the start command's logs using the SDK during runtime.
45+
46+
<Note>
47+
These logs are the logs from the start command during the build phase.
48+
</Note>
4549

4650
<CodeGroup title="Check start command logs" isRunnable={false}>
4751
```js {{ language: 'js' }}
@@ -77,6 +81,13 @@ sandbox.close()
7781
```
7882
</CodeGroup>
7983

84+
Or you can use the CLI:
85+
86+
<CodeGroup isTerminalCommand>
87+
```bash {{ language: 'bash' }}
88+
e2b sandbox logs <sandbox-id>
89+
```
90+
</CodeGroup>
8091

8192
## Sandbox template config
8293
The start command is specified inside the `e2b.toml` in the same directory where you ran `e2b build -c "<your-start-command>"`.

apps/web/src/components/Navigation/routes.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ export const docRoutes: NavGroup[] = [
319319
title: 'Sandbox customization',
320320
href: '/docs/sandbox-template',
321321
},
322+
{
323+
title: 'Start command',
324+
href: '/docs/sandbox-template/start-cmd',
325+
},
322326
{
323327
title: 'Customize CPU & RAM',
324328
href: '/docs/sandbox-template/customize-cpu-ram',

0 commit comments

Comments
 (0)