fix(sdks): handle multi-source COPY/ADD in fromDockerfile#1355
Conversation
Previously, Template.fromDockerfile (JS) and Template.from_dockerfile (Python) silently dropped intermediate sources from multi-source COPY/ADD instructions, keeping only the first source. This produced broken images (e.g. missing package-lock.json) without warning. Emit one copy() call per source so all sources land at the destination, matching Docker semantics. Preserves --chown across all calls. Fixes #1349 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Package ArtifactsBuilt from f878330. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.26.1-mishushakov-fix-issue-1349.0.tgzCLI ( npm install ./e2b-cli-2.10.3-mishushakov-fix-issue-1349.0.tgzPython SDK ( pip install ./e2b-2.24.0+mishushakov.fix.issue.1349-py3-none-any.whl |
PR SummaryLow Risk Overview JS ( Reviewed by Cursor Bugbot for commit a5407c6. Bugbot is set up for automated code reviews on this repo. Configure here. |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a5407c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
matthewlouisbrockman
left a comment
There was a problem hiding this comment.
tests only cover COPY not ADD but not blocking
Summary
Template.fromDockerfile(JS) andTemplate.from_dockerfile(Python) silently dropped intermediate sources from multi-sourceCOPY/ADD, keeping only the first one and producing broken images without warning.copy()call per source to the same destination (matching Docker semantics), preserving--chownacross all calls.--chown), plus changesets fore2band@e2b/python-sdk.Test plan
pnpm run test tests/template/methods/fromDockerfile.test.ts(JS)poetry run pytest tests/{async,sync}/template_*/methods/test_from_dockerfile.py(Python)pnpm run format/pnpm run lint🤖 Generated with Claude Code