Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Mention build args in docs
Jakub Novak220a7d822a91
diff --git a/apps/docs/src/app/cli/commands/page.mdx b/apps/docs/src/app/cli/commands/page.mdxindex 0fe5412d2..886c53173 100644--- a/apps/docs/src/app/cli/commands/page.mdx+++ b/apps/docs/src/app/cli/commands/page.mdx@@ -109,6 +109,9 @@ If there is no `e2b.toml` config a new template will be created.<Option type="--memory-mb" name="memory-mb">Specify the amount of memory in megabytes that will be used to run the sandbox. Must be an even number. The default value is 512.</Option>+ <Option type="--build-arg" name="build-arg">+ Specify a build argument for the Dockerfile. The format is `key=value`. You can use this option multiple times.+ </Option></Options>## `template delete`diff --git a/apps/docs/src/app/sandbox/templates/template-file/page.mdx b/apps/docs/src/app/sandbox/templates/template-file/page.mdxindex 5d6af33dd..3e94c31f4 100644--- a/apps/docs/src/app/sandbox/templates/template-file/page.mdx+++ b/apps/docs/src/app/sandbox/templates/template-file/page.mdx@@ -23,7 +23,7 @@ The Dockerfile must be Debian based (e.g. Ubuntu). Only the following [Dockerfil- `COPY`- `RUN`- `WORKDIR`-+ - `ARG`## Examplediff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.tsindex af5d80326..b484ce78c 100644--- a/packages/cli/src/commands/template/build.ts+++ b/packages/cli/src/commands/template/build.ts@@ -115,7 +115,7 @@ export const buildCommand = new commander.Command('build')config?: stringcpuCount?: numbermemoryMb?: number- buildArgs?: [string]+ dockerBuildArgs?: [string]},) => {try {@@ -127,10 +127,9 @@ export const buildCommand = new commander.Command('build')process.exit(1)}- // TODO: pass directly?const dockerBuildArgs: {[key: string]: string} = {}- if (opts.buildArgs) {- opts.buildArgs.forEach((arg) => {+ if (opts.dockerBuildArgs) {+ opts.dockerBuildArgs.forEach((arg) => {const [key, value] = arg.split('=')dockerBuildArgs[key] = value})