|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
| 2 | +// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/ubuntu |
| 3 | +{ |
| 4 | + "name": "rules_dotnet", |
| 5 | + "containerEnv": { |
| 6 | + // Override .Net cache locations: https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders |
| 7 | + "NUGET_PACKAGES": "/home/vscode/.cache/nuget_packages", |
| 8 | + "NUGET_HTTP_CACHE_PATH": "/home/vscode/.cache/nuget_http_cache" |
| 9 | + }, |
| 10 | + "mounts": [ |
| 11 | + // We mount the caches as volumes so that they persist between containers |
| 12 | + "source=rules-dotnet-caches,target=/home/vscode/.cache,type=volume" |
| 13 | + ], |
| 14 | + // We need to chown the .cache folder since it's created by the root user during the container creation |
| 15 | + "postCreateCommand": "sudo chown vscode /home/vscode/.cache", |
| 16 | + "customizations": { |
| 17 | + // Configure properties specific to VS Code. |
| 18 | + "vscode": { |
| 19 | + // Set *default* container specific settings.json values on container create. |
| 20 | + "settings": { |
| 21 | + // Set the default terminal to use Bash because it can get wonky |
| 22 | + // if the user has e.g. zsh or fish configured as their default shell |
| 23 | + // and it's not installed in the container. |
| 24 | + "terminal.integrated.profiles.linux": { |
| 25 | + "bash": { |
| 26 | + "path": "bash", |
| 27 | + "args": [] |
| 28 | + } |
| 29 | + }, |
| 30 | + "terminal.integrated.defaultProfile.linux": "bash" |
| 31 | + }, |
| 32 | + // Add the IDs of extensions you want installed when the container is created. |
| 33 | + "extensions": [ |
| 34 | + "BazelBuild.vscode-bazel", |
| 35 | + "ms-dotnettools.csharp", |
| 36 | + "Ionide.Ionide-fsharp", |
| 37 | + "zxh404.vscode-proto3", |
| 38 | + "timonwong.shellcheck", |
| 39 | + "mutantdino.resourcemonitor" |
| 40 | + ] |
| 41 | + } |
| 42 | + }, |
| 43 | + "build": { |
| 44 | + "dockerfile": "Dockerfile", |
| 45 | + // Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04 |
| 46 | + // Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon. |
| 47 | + "args": { |
| 48 | + "VARIANT": "ubuntu-22.04" |
| 49 | + } |
| 50 | + }, |
| 51 | + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 52 | + "remoteUser": "vscode", |
| 53 | + "features": { |
| 54 | + "ghcr.io/devcontainers/features/dotnet:2.0.2": { |
| 55 | + "version": "8.0.100" |
| 56 | + }, |
| 57 | + "ghcr.io/devcontainers/features/git:1.1.6": { |
| 58 | + "version": "2.43.0" |
| 59 | + }, |
| 60 | + "ghcr.io/devcontainers/features/github-cli:1.0.11": { |
| 61 | + "version": "2.42.1" |
| 62 | + } |
| 63 | + } |
| 64 | +} |
0 commit comments