E2B icon indicating copy to clipboard operation
E2B copied to clipboard

Using `e2b build` in Windows miniconda terminal fails

Open ValentaTomas opened this issue 2 years ago • 3 comments

When you use e2b build on Windows with miniconda terminal there seems to be a bug when creating the TAR archive because during the building of the template on our infra the builder cannot find the required files probably because of invalid paths in the archive.

e2b.Dockerfile

# You can use most Debian-based base images
FROM ubuntu:22.04

# Install dependencies and customize sandbox
RUN apt update \
    && apt install sudo
(e2b) PS F:\my\e2b> e2b build --name "yyy"

Preparing sandbox template building (1 files in Docker build context).
Found ./e2b.Dockerfile that will be used to build the sandbox template.
Started building the sandbox template xxx yyy

API error (500): Cannot locate specified Dockerfile: Dockerfile
Build failed, received error while building docker image.
Error:
❌ Building sandbox template xxx yyy failed.
Check the logs above for more details or contact us (https://e2b.dev/docs/getting-help) to get help.

    at qX (C:\Users\User\AppData\Roaming\npm\node_modules\@e2b\cli\dist\index.js:148:84)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async e.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\@e2b\cli\dist\index.js:123:1510

We should check the CLI logic for creating the archive and resolving path so it work for Windows paths too. When using WSL the CLI works normally.

E2B-436

ValentaTomas avatar Dec 04 '23 11:12 ValentaTomas

I faced same issue earlier. Rename e2b.Dockerfile to Dockerfile and it works

vaibhavard avatar Dec 10 '23 16:12 vaibhavard

@vaibhavard Thanks for the feedback. You too are using Windows, right? We encountered a similar error that happens when you put e2b.Dockerfile into .dockerignore so I'm just checking if your bug was not something else internally.

ValentaTomas avatar Dec 10 '23 17:12 ValentaTomas

This might be solved because we are using local Docker now.

ValentaTomas avatar Jul 22 '24 21:07 ValentaTomas