e2b-dev / E2B

Secure open source cloud runtime for AI apps & AI agents
https://e2b.dev/docs
Apache License 2.0
7.02k stars 458 forks source link

CLI build step: Replace Docker CLI process with connecting to daemon directly #387

Closed erik-dunteman closed 3 months ago

erik-dunteman commented 4 months ago

(WIP)

This is a partial migration from subprocess calls to interacting with daemon directly using https://github.com/apocas/dockerode

Why

For cleaner and more explicit handling of error cases during docker build and docker push during the e2b template build command.

Next steps

  1. migrate remaining docker calls (login, push) to dockerode. Note login doesn't exist in dockerode but it can be a config n the push call.
  2. pretty print the progress bars for image pulling and pushing. MVP added in this WIP but it needs to be cleaned up to look more like the docker CLI experience.
  3. test non-trivial cases:
    • build args
changeset-bot[bot] commented 4 months ago

⚠️ No Changeset found

Latest commit: cfe07ab18f1e1d52e4e6543ef81bec843a0c9eac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR