Commit e8fab56
build-arg's not working for e2b template build command (#644)
At the moment if you pass in build args it breaks since the commands
aren't compatible with the docker build command:
Sample error at the moment when passing the --build-arg to e2b which
proxies the command on incorrectly:
```
(base) ➜ web git:(lb) ✗ npm run build-template template-name version
> new-nextjs-app@0.1.0 build-template
> ts-node scripts/build-template.ts template-name template-version sha
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.
Usage: docker buildx build [OPTIONS] PATH | URL | -
Start a build
/bin/sh: line 4: --build-arg=TEMPLATE_VERSION=0.0.1: command not found
Error: Command failed: docker build . \
-f e2b.Dockerfile \
--pull --platform linux/amd64 \
-t docker.e2b.dev/e2b/custom-envs/17e92ok9u0gimh3oy1qg:be0bdf11-4cf2-4ee0-a932-1ecb6ae50298 --build-arg="TEMPLATE_NAME=lead-magnet" \
--build-arg="TEMPLATE_VERSION=0.0.1"
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:889:11)
at Object.execSync (node:child_process:961:15)
at e.<anonymous> (/opt/homebrew/lib/node_modules/@e2b/cli/src/commands/template/build.ts:363:23) {
status: 127,
signal: null,
output: [ null, null, null ],
pid: 67925,
stdout: null,
stderr: null
}
Failed to build template: Error: Command failed: e2b template build -d "../../sandbox/templates/e2b.Dockerfile" -n template-name sha1 --build-arg TEMPLATE_NAME=template-name --build-arg TEMPLATE_VERSION=0.0.1 -p "../sandbox/templates/"
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.
Usage: docker buildx build [OPTIONS] PATH | URL | -
```
---------
Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>1 parent ebfade8 commit e8fab56
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
0 commit comments