Repository navigation
Add devcontainer + per-OS host and SSH signing docs #63
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
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
37b10b4
Rename Library project to NuGetLibrary
ptr727 5243352
Add devcontainer + per-OS host and SSH signing docs
ptr727 28736a9
Address Copilot review on PR #63
ptr727 449d494
Drop USERPROFILE concat from devcontainer mount sources
ptr727 eb38ace
Restore HOME/USERPROFILE fallback for devcontainer mount sources
ptr727 b0b1a95
Merge remote-tracking branch 'origin/develop' into devcontainer-docs
ptr727 70c8e38
Address Copilot review on PR #63
ptr727 f675bd2
Enforce uv version pin even when uv is already installed
ptr727 0499325
Merge remote-tracking branch 'origin/develop' into devcontainer-docs
ptr727 2377fe9
Address Copilot review on PR #63 (post-merge round)
ptr727 6fec022
Drop ms-pyright.pyright; mark mypy/pylint/black/etc as unwanted
ptr727 f036424
Drop ms-pyright.pyright from devcontainer extension list
ptr727 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
Some comments aren't visible on the classic Files Changed page.
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 |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| { | ||
| "name": "ProjectTemplate", | ||
| "image": "mcr.microsoft.com/devcontainers/dotnet:1-10.0", | ||
|
|
||
| "features": { | ||
| "ghcr.io/devcontainers/features/common-utils:2": {}, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {} | ||
| }, | ||
|
|
||
| "mounts": [ | ||
| { | ||
| "source": "${localEnv:HOME}/.ssh/id_ed25519.pub", | ||
| "target": "/home/vscode/.ssh/id_ed25519.pub", | ||
| "type": "bind", | ||
| "readonly": true | ||
| }, | ||
| { | ||
| "source": "${localEnv:HOME}/.config/git/allowed_signers", | ||
| "target": "/home/vscode/.config/git/allowed_signers", | ||
| "type": "bind", | ||
| "readonly": true | ||
| }, | ||
| { | ||
| "source": "${localEnv:HOME}/.config/gh", | ||
| "target": "/home/vscode/.config/gh", | ||
| "type": "bind", | ||
| "readonly": false | ||
| } | ||
| ], | ||
|
|
||
| "remoteUser": "vscode", | ||
| // workspaceFolder defaults to /workspaces/${localWorkspaceFolderBasename}, | ||
| // which makes the devcontainer config portable: when this template is | ||
| // forked into a repo with a different folder name, the mount path tracks | ||
| // the host folder name automatically. | ||
|
|
||
| // The bind-mount on macOS hosts surfaces /home/vscode/.ssh as root-owned; | ||
| // chown it back so writes from inside the container (known_hosts updates | ||
| // by gh / git) land cleanly. Idempotent on Linux/WSL2. | ||
| "onCreateCommand": "sudo install -d -m 700 -o vscode -g vscode /home/vscode/.ssh", | ||
|
|
||
| // Install uv for the Python sibling project, restore .NET local tools, | ||
| // and install the husky git hooks. uv is installed under $HOME/.local/bin | ||
| // and added to PATH by uv's install script. | ||
| "postCreateCommand": ".devcontainer/post-create.sh", | ||
|
|
||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "csharpier.csharpier-vscode", | ||
| "davidanson.vscode-markdownlint", | ||
| "editorconfig.editorconfig", | ||
| "github.vscode-github-actions", | ||
| "gruntfuggly.todo-tree", | ||
| "ms-azuretools.vscode-docker", | ||
| "ms-dotnettools.csdevkit", | ||
| "streetsidesoftware.code-spell-checker", | ||
| "yzhang.markdown-all-in-one", | ||
| "ms-python.python", | ||
| "charliermarsh.ruff", | ||
| "ms-pyright.pyright" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # Install uv (Astral) for the Python sibling project. Idempotent — re-running | ||
| # overwrites in place. The installer drops the binary in $HOME/.local/bin and | ||
| # updates user shell init to add it to PATH for new shells; we add it to the | ||
| # current PATH explicitly so the rest of this script can invoke `uv` without a | ||
| # hard-coded path. | ||
| if ! command -v uv >/dev/null 2>&1; then | ||
|
ptr727 marked this conversation as resolved.
Outdated
|
||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
ptr727 marked this conversation as resolved.
Outdated
|
||
| export PATH="$HOME/.local/bin:$PATH" | ||
| fi | ||
|
|
||
| # Restore the .NET local-tool manifest (CSharpier, Husky.Net, dotnet-outdated). | ||
| dotnet tool restore | ||
|
|
||
| # Install Husky.Net git hooks so commits run pre-commit checks. Failures here | ||
| # (e.g. missing .git directory, broken tool restore) should surface — the | ||
| # devcontainer setup is not "successful" if hook installation fails silently. | ||
| dotnet husky install | ||
|
|
||
| # Pre-warm uv environment for PyPiLibrary if it exists. Guarded so this script | ||
| # is safe before PyPiLibrary lands in the repo. | ||
| if [[ -f PyPiLibrary/pyproject.toml ]]; then | ||
| (cd PyPiLibrary && uv sync) | ||
| fi | ||
|
ptr727 marked this conversation as resolved.
|
||
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
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
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
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
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
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
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
File renamed without changes.
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
File renamed without changes.
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
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
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
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
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
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.
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.