docs: document sandbox port publishing at creation - #25725
Conversation
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.
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
docker-agent
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
[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,
--publishtakes effect. Whensbx runre-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 |
There was a problem hiding this comment.
[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,
--publishtakes effect. Whensbx runre-attaches to an existing sandbox, it ignores--publish.
Summary
Document how to publish a sandbox port with
sbx runat creation time and clarify that existing sandboxes still requiresbx ports.@netlify /ai/sandboxes/usage/
Preview
Generated by Codex