-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore: update devcontainer configuration #10955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
anthonyshew
merged 2 commits into
main
from
cursor/update-devcontainer-configuration-from-scratch-7788
Oct 10, 2025
+114
−72
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,72 @@ | ||
| # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/go/.devcontainer/base.Dockerfile | ||
|
|
||
| # [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster | ||
| ARG VARIANT="1.18-bullseye" | ||
| FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT} | ||
|
|
||
| RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
| && apt-get -y install --no-install-recommends \ | ||
| # Chromium for running Turbopack benchmarks | ||
| chromium \ | ||
| # Used for plotters graph visualizations in turbopack benchmarks | ||
| libfontconfig1-dev | ||
|
|
||
| # Add hyperfine, a useful benchmarking tool | ||
| RUN dpkgArch="$(dpkg --print-architecture)"; \ | ||
| wget "https://github.com/sharkdp/hyperfine/releases/download/v1.12.0/hyperfine_1.12.0_${dpkgArch}.deb" && dpkg -i "hyperfine_1.12.0_${dpkgArch}.deb" | ||
|
|
||
| # | ||
| # Everything below is run as the vscode user. If superuser permissions are necessary, | ||
| # run it before this. Otherwise, prefer running as the vscode user. | ||
| # | ||
| USER vscode | ||
| # Use Ubuntu 22.04 LTS as base image | ||
| FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04 | ||
|
|
||
| # Set environment variables | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| ENV RUSTUP_HOME=/usr/local/rustup | ||
| ENV CARGO_HOME=/usr/local/cargo | ||
| ENV PATH=/usr/local/cargo/bin:$PATH | ||
| ENV RUST_VERSION=nightly-2025-06-20 | ||
|
|
||
| # Install system dependencies | ||
| RUN apt-get update && apt-get install -y \ | ||
| # Build essentials | ||
| build-essential \ | ||
| pkg-config \ | ||
| # LLD linker (required on Linux per CONTRIBUTING.md) | ||
| lld \ | ||
| # Protocol Buffers compiler | ||
| protobuf-compiler \ | ||
| # Cap'n Proto | ||
| capnproto \ | ||
| libcapnp-dev \ | ||
| # Testing utilities (optional but useful) | ||
| jq \ | ||
| zstd \ | ||
| # SSL development libraries | ||
| libssl-dev \ | ||
| # Additional utilities | ||
| curl \ | ||
| wget \ | ||
| git \ | ||
| ca-certificates \ | ||
| gnupg \ | ||
| lsb-release \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install Node.js v22 (using NodeSource repository for exact version control) | ||
| RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ | ||
| && apt-get install -y nodejs \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 | ||
| ARG NODE_VERSION="none" | ||
| RUN if [ "${NODE_VERSION}" != "none" ]; then umask 0002 && sh -c ". /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION}" 2>&1; fi | ||
| # Install pnpm globally (specific version as per package.json) | ||
| RUN npm install -g pnpm@8.14.0 | ||
|
|
||
| # Install Rust with the specific nightly version and components | ||
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ | ||
| --default-toolchain ${RUST_VERSION} \ | ||
| --profile minimal \ | ||
| --component rustfmt,clippy \ | ||
| -y \ | ||
| && chmod -R a+w $RUSTUP_HOME $CARGO_HOME | ||
|
|
||
| # Create cache directories for better performance | ||
| RUN mkdir -p /home/vscode/.cache /usr/local/cargo \ | ||
| && chown -R vscode:vscode /home/vscode/.cache /usr/local/cargo | ||
|
|
||
| # Set the default user to vscode | ||
| USER vscode | ||
|
|
||
| RUN sh -c ". /usr/local/share/nvm/nvm.sh && npm install -g vercel yarn yalc pnpm nodemon" 2>&1 | ||
| # Verify installations | ||
| RUN node --version \ | ||
| && npm --version \ | ||
| && pnpm --version \ | ||
| && rustc --version \ | ||
| && cargo --version \ | ||
| && protoc --version \ | ||
| && capnp --version \ | ||
| && jq --version \ | ||
| && zstd --version \ | ||
| && which lld | ||
|
|
||
| # The installer from https://rustup.rs/ homepage, with the following changes: | ||
| # * `-y` to accept without interactivity | ||
| # * `--default-toolchain none` to avoid installing stable rust. Our specific toolchain is installed post-create. | ||
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none | ||
| WORKDIR /workspace | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,51 @@ | ||
| // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
| // https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/go | ||
| { | ||
| "name": "turbo (go, node, rust)", | ||
| "name": "Turborepo Development Environment", | ||
| "build": { | ||
| "dockerfile": "Dockerfile", | ||
| "args": { | ||
| // Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17 | ||
| // Append -bullseye or -buster to pin to an OS version. | ||
| // Use -bullseye variants on local arm64/Apple Silicon. | ||
| "VARIANT": "1.18-bullseye", | ||
| // Options | ||
| "NODE_VERSION": "lts/*" | ||
| } | ||
| "context": "." | ||
| }, | ||
| "runArgs": [ | ||
| "--cap-add=SYS_PTRACE", | ||
| "--security-opt", | ||
| "seccomp=unconfined" | ||
| ], | ||
| // Add the IDs of extensions you want installed when the container is created. | ||
| "extensions": [ | ||
| "bradlc.vscode-tailwindcss", | ||
| "christian-kohler.npm-intellisense", | ||
| "dbaeumer.vscode-eslint", | ||
| "eamodio.gitlens", | ||
| "EditorConfig.EditorConfig", | ||
| "esbenp.prettier-vscode", | ||
| "github.copilot", | ||
| "github.vscode-pull-request-github", | ||
| "golang.go", | ||
| "heybourn.headwind", | ||
| "rust-lang.rust-analyzer", | ||
| "silvenon.mdx", | ||
| "windmilleng.vscode-go-autotest", | ||
| "yzhang.markdown-all-in-one" | ||
| ], | ||
| // Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
| // "forwardPorts": [], | ||
|
|
||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| "postCreateCommand": "cargo --version", | ||
| // Invoking `cargo` will eagerly install the toolchain specified in rust-toolchain file | ||
|
|
||
| // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
| "remoteUser": "vscode", | ||
| "features": { | ||
| "docker-in-docker": "latest", | ||
| "git": "latest", | ||
| "github-cli": "latest" | ||
| } | ||
| } | ||
| "ghcr.io/devcontainers/features/github-cli:1": {}, | ||
| "ghcr.io/devcontainers/features/git:1": {} | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "rust-lang.rust-analyzer", | ||
| "bradlc.vscode-tailwindcss", | ||
| "esbenp.prettier-vscode", | ||
| "ms-vscode.vscode-json", | ||
| "ms-vscode.vscode-typescript-next", | ||
| "tamasfe.even-better-toml", | ||
| "vadimcn.vscode-lldb" | ||
vercel[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ], | ||
| "settings": { | ||
| "rust-analyzer.cargo.buildScripts.enable": true, | ||
| "rust-analyzer.checkOnSave.command": "clippy", | ||
| "rust-analyzer.rustfmt.rangeFormatting.enable": true, | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "[rust]": { | ||
| "editor.defaultFormatter": "rust-lang.rust-analyzer" | ||
| }, | ||
| "[toml]": { | ||
| "editor.defaultFormatter": "tamasfe.even-better-toml" | ||
| }, | ||
| "typescript.preferences.importModuleSpecifier": "relative", | ||
| "javascript.preferences.importModuleSpecifier": "relative" | ||
| } | ||
| } | ||
| }, | ||
| "forwardPorts": [3000, 3001, 9000, 9001], | ||
| "postCreateCommand": "pnpm install && rustup component add llvm-tools-preview", | ||
| "remoteUser": "vscode", | ||
| "mounts": [ | ||
| "source=${localWorkspaceFolder}/.devcontainer/cache,target=/home/vscode/.cache,type=bind,consistency=cached", | ||
| "source=${localWorkspaceFolder}/.devcontainer/cargo,target=/usr/local/cargo,type=bind,consistency=cached" | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.