Skip to content

Conversation

@mishushakov
Copy link
Member

@mishushakov mishushakov commented Nov 24, 2025

Fixes issue #1032


Note

Preserve Dockerfile USER/WORKDIR when provided and only apply E2B defaults if absent, with tests and CLI fixtures updated accordingly.

  • Dockerfile parsing (SDKs):
    • JS (packages/js-sdk/src/template/dockerfileParser.ts): Track USER/WORKDIR usage and only set E2B defaults (user, /home/user) if not specified; keep Docker defaults (root, /) initially.
    • Python (packages/python-sdk/e2b/template/dockerfile_parser.py): Same behavior—preserve explicit USER/WORKDIR, fallback to defaults only when absent.
  • Tests:
    • JS: Add tests for default vs. custom USER/WORKDIR in fromMethods.test.ts.
    • Python (async/sync): Add analogous tests in test_from_methods.py.
  • CLI template fixtures:
    • Update expected outputs to remove redundant .set_user('user')/.set_workdir('/home/user') when already specified; minor ordering tweak for .setStartCmd in TS fixture.
  • Changeset:
    • Minor version bumps for @e2b/python-sdk and e2b; note: keep Docker WORKDIR and USER if specified.

Written by Cursor Bugbot for commit 1ce6636. This will update automatically on new commits. Configure here.

@linear
Copy link

linear bot commented Nov 24, 2025

@changeset-bot
Copy link

changeset-bot bot commented Nov 24, 2025

🦋 Changeset detected

Latest commit: 1ce6636

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

This PR includes changesets to release 2 packages
Name Type
@e2b/python-sdk Minor
e2b Minor

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

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.

2 participants