SYN-1388: Add devcontainer.json declarative env definition to dev-sandbox#190
SYN-1388: Add devcontainer.json declarative env definition to dev-sandbox#190JoshuaPurtell wants to merge 5 commits intomainfrom
Conversation
| "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/synth-ai,type=bind", | ||
| "remoteUser": "root", | ||
| "build": { | ||
| "dockerfile": "Dockerfile", |
There was a problem hiding this comment.
🔴 Dockerfile path resolves to non-existent .devcontainer/Dockerfile
The devcontainer.json specifies "dockerfile": "Dockerfile" at line 8. Per the devcontainer spec, the dockerfile path is resolved relative to the devcontainer.json file, which means it resolves to .devcontainer/Dockerfile. However, no such file exists in the .devcontainer/ directory — only devcontainer.json is present.
Root Cause and Fix
The intent is to reuse the Dockerfile from the sibling synth-bazel/dev-sandbox repo (as stated in the README at README.md:245). The build.context is correctly set to "../../synth-bazel/dev-sandbox" (resolving to ../synth-bazel/dev-sandbox/ from the repo root), but the dockerfile field needs to point to the Dockerfile within that context directory.
The dockerfile should be "../../synth-bazel/dev-sandbox/Dockerfile" to correctly reference the Dockerfile in the sibling repo, relative to the devcontainer.json location.
Impact: Running devcontainer up --workspace-folder . (as documented in README.md:250) will fail because Docker cannot find the Dockerfile, making the entire dev container setup non-functional.
| "dockerfile": "Dockerfile", | |
| "dockerfile": "../../synth-bazel/dev-sandbox/Dockerfile", |
Was this helpful? React with 👍 or 👎 to provide feedback.
Greptile SummaryAdded declarative devcontainer configuration that standardizes dev-sandbox setup across Colima and Daytona environments. The
One note: the devcontainer build relies on Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[devcontainer up] --> B[Load devcontainer.json]
B --> C[Build from ../../synth-bazel/dev-sandbox/Dockerfile]
C --> D[Mount workspace at /workspace/synth-ai]
D --> E[Set WORKSPACE_DIR env var]
E --> F[Run postCreateCommand]
F --> G[Execute ./.sandbox/setup.sh]
G --> H{Check for uv command}
H -->|Found| I[cd $WORKSPACE_DIR]
I --> J[git config safe.directory]
J --> K[uv sync --frozen]
K --> L[maturin develop --release --uv]
L --> M[Dev sandbox ready]
H -->|Not found| N[Exit with error]
Last reviewed commit: 5349378 |
| "dockerfile": "Dockerfile", | ||
| "context": "../../synth-bazel/dev-sandbox" |
There was a problem hiding this comment.
Verify synth-bazel/dev-sandbox/Dockerfile exists at this relative path - devcontainer will fail to build if sibling repo is missing or in different location
Resolves https://linear.app/synth-ai/issue/SYN-1388/add-devcontainerjson-declarative-env-definition-to-dev-sandbox