docs: distinguish the ${WORKDIR} placeholder from the WORKSPACE_DIR variable - #26230
mdelapenya wants to merge 2 commits into
Conversation
…ariable
Kit authors mix up three things that share a word: the v2 ${WORKDIR}
placeholder that is replaced only inside setup.files content, the
WORKSPACE_DIR environment variable the runtime sets in the container, and
the image's Dockerfile WORKDIR. Name all three where setup.files is
documented, say that WORKDIR is not an environment variable, and note that
v3 kits have no placeholder and read the variable through kit.env in
lifecycle files instead.
Refs docker/sbx-releases#570
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Manuel de la Peña <manuel.delapena@docker.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The distinction is useful, but the explanation needs a clearer sequence. Please lead with what authors should write in generated files versus shell commands, then explain when substitution happens. On the v3 page, give generated files their own subsection and replace “the same variables” with “container environment variables.” On the v2 page, consolidate the repeated placeholder explanation, qualify the shell syntax for startup commands, and move the v3 comparison to the migration section. Also replace the absolute claim that no Generated by Codex |
Review feedback on the WORKDIR / WORKSPACE_DIR clarification: the pages now open with what to write in generated files versus shell commands and only then explain when substitution happens. The v3 page gives generated files their own subsection, names container environment variables as what kit.env reads, and says unsubstituted references are written unchanged. The v2 page states the placeholder once, qualifies that shell syntax in startup commands expands only under a shell, moves the v3 comparison to the migration section, and narrows the WORKDIR claim to what a Dockerfile WORKDIR does not define. Related: docker/sbx-releases#570 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Manuel de la Peña <manuel.delapena@docker.com>
|
Thanks for the pass, all five taken in 42c38b4. Both pages now open with what to write ( On the v2 page the placeholder is stated once, the One call you may want to check: I dropped the |
Description
Kit authors mix up three names that share a word: the v2
${WORKDIR}placeholder, theWORKSPACE_DIRenvironment variable, and the image's DockerfileWORKDIR. The v2 reference only said that${WORKDIR}"expands to the workspace path", which reads as if it were a variable, and nothing on the page said whereWORKSPACE_DIRis available.This change, on the Kits v2 page:
contentrow ofsetup.filesso${WORKDIR}is described as a literal replaced at creationfilesnaming the three things and where each applies, and states that there is noWORKDIRenvironment variable in the sandboxinstallthat the workspace path is available asWORKSPACE_DIROn the "Author kits" page, under "Pass environment variables to hooks", one paragraph says that v3 lifecycle
filescontent reads variables through${{ kit.env.NAME }}(for example${{ kit.env.WORKSPACE_DIR }}) and that plain$VARstays literal, since v3 has no${WORKDIR}placeholder. That matches the public v3 kit spec.Verified behaviour from the
sbxruntime: the placeholder is replaced only insetup.files[].content;WORKSPACE_DIRis set in the container and visible to install and startup commands and to the agent.Related issues or tickets
Reviews