Skip to content

Commit

Permalink
chore(dev): Dev container and VS code config improvements (#1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnwood committed May 22, 2024
1 parent 366938e commit c03489a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/devcontainers/dotnet

COPY installcustom.sh /
RUN /bin/sh /installcustom.sh
26 changes: 24 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
{
"appPort": [2525, 8080],
"extensions": ["ms-vscode.csharp", "formulahendry.dotnet-test-explorer", "msjsdiag.debugger-for-chrome", "ms-azuretools.vscode-docker", "dbaeumer.vscode-eslint", "octref.vetur", "ms-azure-devops.azure-pipelines"]
"appPort": [
2525,
8080
],
"extensions": [
"ms-vscode.csharp",
"formulahendry.dotnet-test-explorer",
"ms-azuretools.vscode-docker",
"dbaeumer.vscode-eslint",
"octref.vetur",
"ms-azure-devops.azure-pipelines",
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csdevkit",
"ms-vscode.PowerShell"
],

"build": {
"dockerfile": "Dockerfile",
"context": "."
},

"containerEnv": {
"SERVEROPTIONS__PORT": "2525"
}
}
6 changes: 6 additions & 0 deletions .devcontainer/installcustom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
sudo apt update
sudo apt install -y telnet

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"args": "--urls http://localhost:5000",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "build"
"preLaunchTask": "build Rnwood.Smtp4dev"

},
{
Expand All @@ -35,6 +35,6 @@
".NET Core Launch (web)",
"Chrome"
],
"preLaunchTask": "build"
"preLaunchTask": "build Rnwood.Smtp4dev"
}]
}
8 changes: 6 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"version": "2.0.0",
"tasks": [
{
"label": "build",
"label": "build Rnwood.Smtp4dev",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/smtp4dev.sln",
"${workspaceFolder}/Rnwood.Smtp4dev",
"/property:GenerateFullPaths=true"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

0 comments on commit c03489a

Please sign in to comment.