Skip to content

fix(js-sdk): preserve multi-source COPY in fromDockerfile#1354

Closed
serejaris wants to merge 1 commit into
e2b-dev:mainfrom
serejaris:fix-fromdockerfile-multi-source-copy
Closed

fix(js-sdk): preserve multi-source COPY in fromDockerfile#1354
serejaris wants to merge 1 commit into
e2b-dev:mainfrom
serejaris:fix-fromdockerfile-multi-source-copy

Conversation

@serejaris
Copy link
Copy Markdown

Summary

  • Fixes Template().fromDockerfile() dropping all but the first source in multi-source Dockerfile COPY instructions.
  • Emits one template COPY step per source while preserving the shared destination and COPY flags like --chown.
  • Adds regression coverage for multi-source COPY and a patch changeset for the JS SDK.

Fixes #1349

Test plan

  • pnpm --filter e2b exec vitest run tests/template/methods/fromDockerfile.test.ts -t "multi-source COPY"
  • pnpm --filter e2b exec vitest run tests/template/methods/fromDockerfile.test.ts
  • pnpm --filter e2b run typecheck
  • pnpm --filter e2b run lint
  • pnpm --filter e2b run build
  • pnpm --filter e2b exec prettier --check src/template/dockerfileParser.ts tests/template/methods/fromDockerfile.test.ts

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 27, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @serejaris on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check'

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: fdf1d17

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
e2b Patch

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

@serejaris
Copy link
Copy Markdown
Author

Closing this as superseded by #1355.\n\nI compared the two PRs: this branch only covers the JS path and is still CLA-blocked, while #1355 covers both JS and Python , includes the multi-source COPY/ADD regressions in both SDKs, and has the maintainer-owned checks/CLA path.\n\nThanks for picking this up; I will track #1355 instead.

@serejaris serejaris closed this May 27, 2026
@serejaris
Copy link
Copy Markdown
Author

Small correction to the comparison above: this branch covers the JS Template.fromDockerfile path, while #1355 covers both JS Template.fromDockerfile and Python Template.from_dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fromDockerfile: multi-source COPY silently drops all sources except the first

1 participant