From bf508d85a4c3937f0b15074f564af0b43d9dadf4 Mon Sep 17 00:00:00 2001 From: i-play-lf2 <914637118@qq.com> Date: Thu, 8 Jan 2026 03:24:25 +0000 Subject: [PATCH 1/3] chore: add template symlinks --- .gitattributes | 1 + README.md | 8 ++++++++ projects/.template/.devcontainer/features | 1 + projects/.template/docker-compose.yaml | 2 +- projects/.template/images | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 120000 projects/.template/.devcontainer/features create mode 120000 projects/.template/images diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfdb8b7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/README.md b/README.md index e457c96..ff13df2 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,11 @@ Prerequisites: Docker is available on the host, and VS Code has the `ms-vscode-r 4. Open `projects/` in VS Code and run `Dev Containers: Reopen in Container`. After the container is created, VS Code opens the workspace at `/mnt/`. The data lives in a Docker volume named `_workspace`. + +## Notes + +This repo uses symlinks under `projects/.template` (for shared `features` and `images`). On Windows, enable symlink support in this repo with: + +```powershell +git config --local core.symlinks true +``` diff --git a/projects/.template/.devcontainer/features b/projects/.template/.devcontainer/features new file mode 120000 index 0000000..767c681 --- /dev/null +++ b/projects/.template/.devcontainer/features @@ -0,0 +1 @@ +../../../features \ No newline at end of file diff --git a/projects/.template/docker-compose.yaml b/projects/.template/docker-compose.yaml index 2326893..6883436 100644 --- a/projects/.template/docker-compose.yaml +++ b/projects/.template/docker-compose.yaml @@ -2,7 +2,7 @@ services: devcontainer: build: # Pick the Dockerfile that matches your dev environment. - dockerfile: ../../images/base/Dockerfile + dockerfile: images/base/Dockerfile args: # Optional: toolchain version for Dockerfiles that accept SDK_VERSION. SDK_VERSION: 0 diff --git a/projects/.template/images b/projects/.template/images new file mode 120000 index 0000000..5fa6987 --- /dev/null +++ b/projects/.template/images @@ -0,0 +1 @@ +../../images \ No newline at end of file From 059fa86c779dc9bef185ea928c5929f49c79f88c Mon Sep 17 00:00:00 2001 From: i-play-lf2 <914637118@qq.com> Date: Thu, 8 Jan 2026 03:28:34 +0000 Subject: [PATCH 2/3] docs: add local feature hint in devcontainer --- projects/.template/.devcontainer/devcontainer.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/.template/.devcontainer/devcontainer.json b/projects/.template/.devcontainer/devcontainer.json index 76cd687..1d96b80 100644 --- a/projects/.template/.devcontainer/devcontainer.json +++ b/projects/.template/.devcontainer/devcontainer.json @@ -1,5 +1,9 @@ { "dockerComposeFile": "../docker-compose.yaml", + "features": { + // Use local features from this repo. + // "./features/uv": {} + }, "mounts": [ "source=workspace,target=${containerWorkspaceFolder},type=volume" ], From fdb7ec00794d101da625a85b8c9c49b7b599c913 Mon Sep 17 00:00:00 2001 From: i-play-lf2 <914637118@qq.com> Date: Thu, 8 Jan 2026 06:28:53 +0000 Subject: [PATCH 3/3] docs: clarify Windows symlink workflow --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff13df2..357e9a1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This repository provides a template-based workflow for VS Code Dev Containers. E Prerequisites: Docker is available on the host, and VS Code has the `ms-vscode-remote.remote-containers` extension installed. 1. Download the repository (e.g., `git clone https://github.com/iplaylf2/vscode-container.git`). -2. Copy `projects/.template/` to `projects/`. +2. Copy `projects/.template/` to `projects/` (Windows: do not copy; use `robocopy` in Notes). 3. Edit `projects//docker-compose.yaml` as needed. 4. Open `projects/` in VS Code and run `Dev Containers: Reopen in Container`. @@ -15,8 +15,17 @@ After the container is created, VS Code opens the workspace at `/mnt/ /E /SL /XC /XN /XO ```