Skip to content

docs: document sandbox port publishing at creation - #25725

Open
dvdksn wants to merge 1 commit into
docker:mainfrom
dvdksn:codex/update-sbx-port-publishing
Open

docs: document sandbox port publishing at creation#25725
dvdksn wants to merge 1 commit into
docker:mainfrom
dvdksn:codex/update-sbx-port-publishing

Conversation

@dvdksn

@dvdksn dvdksn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Document how to publish a sandbox port with sbx run at creation time and clarify that existing sandboxes still require sbx ports.

@netlify /ai/sandboxes/usage/

Preview

Generated by Codex

The usage and workflow guides incorrectly said ports could only be published after sandbox creation. Document the create-time flags and retain sbx ports for existing sandboxes.
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 3328565
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a7303d637e6980008feded7
😎 Deploy Preview https://deploy-preview-25725--docsdocker.netlify.app/ai/sandboxes/usage/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dvdksn dvdksn added the status/review Pull requests that are ready for review label Aug 5, 2026
@dvdksn
dvdksn requested a review from a team August 5, 2026 09:36

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The changes correctly document create-time port publishing via sbx run --publish and add the appropriate caveat that existing sandboxes require sbx ports. No high- or medium-severity issues found: no vendored files edited, no pages moved without redirects, no AI-isms, no incorrect commands, and scope is well-preserved across both files.

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The changes correctly document the new create-time --publish flag for sbx run and clarify that existing sandboxes still require sbx ports. The structure is clear, commands are accurate, and the style follows Docker documentation conventions (no hedge words, correct code formatting, sentence-case headings). Two minor suggestions below.

You can't publish ports at create time — there's no `--publish` flag on
`sbx run` or `sbx create`, so publish them once the sandbox is running. For
dev server and host-service recipes, see
When `sbx run` re-attaches to an existing sandbox, it ignores `--publish`. Use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Caveat doesn't explicitly confirm --publish works on first creation

The sentence "When sbx run re-attaches to an existing sandbox, it ignores --publish." is scoped to the re-attach case by its subject clause, but a reader scanning quickly may still wonder whether --publish ever works with sbx run. Since the section just introduced create-time publishing as a new capability, explicitly affirming it before the caveat would eliminate any residual doubt:

On first creation, --publish takes effect. When sbx run re-attaches to an existing sandbox, it ignores --publish.

`sbx run` or `sbx create`, so publish them once the sandbox is running. To stop
forwarding, `--unpublish 8080:3000` removes a single mapping, and
`--unpublish 3000` removes every host port mapped to sandbox port 3000.
When `sbx run` re-attaches to an existing sandbox, it ignores `--publish`. Use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Caveat doesn't explicitly confirm --publish works on first creation

Same minor clarity gap as in usage.md. The subject clause scopes the caveat to re-attach, but adding an explicit affirmation before it removes any ambiguity for readers who land here directly:

On first creation, --publish takes effect. When sbx run re-attaches to an existing sandbox, it ignores --publish.

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

Labels

area/ai status/review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants