Skip to content

Commit

Permalink
Update devcontainer config
Browse files Browse the repository at this point in the history
* updated to .net 6.0
  • Loading branch information
Andraz Vrhovec committed Jan 8, 2022
1 parent 07099a7 commit 0fdb279
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 61 deletions.
21 changes: 7 additions & 14 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.145.0/containers/dotnetcore/.devcontainer/base.Dockerfile
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET Core version: 3.1, 2.1
ARG VARIANT="3.1"
FROM mcr.microsoft.com/vscode/devcontainers/dotnetcore:0-${VARIANT}
# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}

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

# [Option] Install Azure CLI
ARG INSTALL_AZURE_CLI="false"
COPY library-scripts/azcli-debian.sh /tmp/library-scripts/
RUN if [ "$INSTALL_AZURE_CLI" = "true" ]; then bash /tmp/library-scripts/azcli-debian.sh; fi \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
25 changes: 11 additions & 14 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/dotnet
{
"name": "C# (.NET Core)",
"name": "C# (.NET)",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1
"VARIANT": "5.0",
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "6.0",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*",
"INSTALL_AZURE_CLI": "false"
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig",
"eamodio.gitlens"
"ms-dotnettools.csharp"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down Expand Up @@ -51,8 +48,8 @@
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "dotnet restore sources/SloCovidServer/SloCovidServer.sln",
// "postCreateCommand": "dotnet restore",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
33 changes: 0 additions & 33 deletions .devcontainer/library-scripts/azcli-debian.sh

This file was deleted.

0 comments on commit 0fdb279

Please sign in to comment.