Skip to content

Commit 94c84cd

Browse files
authored
Fix .NET Docker image used in Codespaces (#36843)
* Fix .NET Docker image used in Codespaces * Update Dockerfile
1 parent 86785f2 commit 94c84cd

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# [Choice] .NET version: 5.0, 3.1, 2.1
44
ARG VARIANT="5.0"
5-
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
5+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet
66

77
# [Option] Install Node.js
88
ARG INSTALL_NODE="true"
99
ARG NODE_VERSION="lts/*"
10-
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

.devcontainer/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
"args": {
8-
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0, 6.0, 7.0
9-
"VARIANT": "7.0",
8+
// The VARIANT here must align with a dotnet container image that
9+
// is publicly available on https://mcr.microsoft.com/v2/vscode/devcontainers/dotnet/tags/list.
10+
// We'll default to `latest` as the default. Generally, the .NET version that is baked
11+
// into the image by default doesn't matter since we end up installing our own
12+
// local version and using that by default in the container environment.
13+
"VARIANT": "latest",
1014
// Options
1115
"INSTALL_NODE": "true",
1216
"NODE_VERSION": "lts/*"

0 commit comments

Comments
 (0)