Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,25 @@ 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/<your-project-name>`.
2. Copy `projects/.template/` to `projects/<your-project-name>` (Windows: do not copy; use `robocopy` in Notes).
3. Edit `projects/<your-project-name>/docker-compose.yaml` as needed.
4. Open `projects/<your-project-name>` in VS Code and run `Dev Containers: Reopen in Container`.

After the container is created, VS Code opens the workspace at `/mnt/<your-project-name>`. The data lives in a Docker volume named `<your-project-name>_workspace`.

## Notes

### Symlinks

This repo uses symlinks under `projects/.template` for shared configuration. On Windows, run the following commands as Administrator:

```powershell
# Enable symlink support in this repo.
git config --local core.symlinks true

# Re-checkout files to restore symlinks when Git deleted them on Windows (destructive: discards local changes).
git checkout -f

# Copy the template while preserving symlinks and skipping unchanged files.
robocopy projects/.template projects/<your-project-name> /E /SL /XC /XN /XO
```
4 changes: 4 additions & 0 deletions projects/.template/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"dockerComposeFile": "../docker-compose.yaml",
"features": {
// Use local features from this repo.
// "./features/uv": {}
},
"mounts": [
"source=workspace,target=${containerWorkspaceFolder},type=volume"
],
Expand Down
1 change: 1 addition & 0 deletions projects/.template/.devcontainer/features
2 changes: 1 addition & 1 deletion projects/.template/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions projects/.template/images
Loading