-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mehdi Hadeli
authored
Jul 26, 2024
1 parent
dabb003
commit c0dea3e
Showing
14 changed files
with
424 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://containers.dev/guide/dockerfile#dockerfile | ||
# https://github.com/devcontainers/images/tree/main/src/dotnet | ||
# https://github.com/devcontainers/templates/tree/main/src/dotnet | ||
|
||
FROM mcr.microsoft.com/devcontainers/dotnet:latest | ||
|
||
# Add additional commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet | ||
// https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/setting-up-your-dotnet-project-for-codespaces | ||
// https://github.com/microsoft/vscode-remote-try-dotnet | ||
// https://dev.to/this-is-learning/set-up-github-codespaces-for-a-net-8-application-5999 | ||
// https://audacioustux.notion.site/Getting-Started-with-Devcontainer-c727dbf9d56f4d6b9b0ef87b3111693f | ||
{ | ||
"name": "Vertical Slice Template", | ||
// use existing dev container templates. More info: https://containers.dev/guide/dockerfile, https://containers.dev/templates | ||
//"image": "mcr.microsoft.com/devcontainers/dotnet:1-7.0", | ||
// use a Dockerfile file. More info: https://containers.dev/guide/dockerfile#dockerfile | ||
// "build": { | ||
// // Path is relative to the devcontainer.json file. | ||
// "dockerfile": "Dockerfile" | ||
// }, | ||
// using a Dockerfile with Docker Compose, https://containers.dev/guide/dockerfile#docker-compose-image | ||
"dockerComposeFile": "docker-compose.yaml", | ||
"service": "devcontainer", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
// https://github.com/devcontainers/features/tree/main/src/dotnet#dotnet-cli-dotnet | ||
"ghcr.io/devcontainers/features/dotnet:2": { | ||
// this version should be matched with global.json .net version for working vscode IntelliSense correctly | ||
"version": "8.0.303", | ||
"additionalVersions": "latest, 7.0.410, 8.0.303, 6.0.424", | ||
"aspNetCoreRuntimeVersions": "latest, 7.0" | ||
}, | ||
// https://github.com/devcontainers/features/tree/main/src/github-cli | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
"version": "2" | ||
}, | ||
// https://github.com/devcontainers/features/tree/main/src/powershell | ||
"ghcr.io/devcontainers/features/powershell:1": { | ||
"version": "latest" | ||
}, | ||
// https://github.com/devcontainers/features/tree/main/src/node | ||
"ghcr.io/devcontainers/features/node:1": {}, | ||
// // https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube | ||
// "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}, | ||
// // https://github.com/devcontainers/features/tree/main/src/terraform | ||
// "ghcr.io/devcontainers/features/terraform:1": {}, | ||
// https://github.com/devcontainers/features/tree/main/src/docker-in-docker | ||
// https://devopscube.com/run-docker-in-docker/ | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
"dockerDashComposeVersion": "v2" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
// https://github.com/devcontainers/features/tree/main/src/common-utils | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"configureZshAsDefaultShell": true | ||
} | ||
}, | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": { | ||
"git.autofetch": true, | ||
"files.autoSave": "onFocusChange", | ||
"editor.formatOnSave": true, | ||
"editor.suggest.snippetsPreventQuickSuggestions": false, | ||
"explorer.autoReveal": true, | ||
"resmon.show.cpufreq": false, | ||
"dotnet.defaultSolution": "food-delivery.sln", | ||
"dotnet.server.startTimeout": 60000, | ||
"omnisharp.projectLoadTimeout": 60, | ||
"workbench.colorTheme": "Visual Studio Light", | ||
"workbench.iconTheme": "material-icon-theme", | ||
"editor.minimap.enabled": false, | ||
"editor.fontFamily": "'MesloLGM Nerd Font', 'Droid Sans Mono', 'monospace', 'Droid Sans Fallback', 'Consolas'", | ||
"editor.fontSize": 14, | ||
"explorer.confirmDelete": false, | ||
"terminal.integrated.defaultProfile.windows": "PowerShell", | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"powershell.cwd": "~", | ||
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe", | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.smoothScrolling": true, | ||
"editor.wordWrap": "on", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.guides.bracketPairs": true, | ||
"explorer.experimental.fileNesting.enabled": true | ||
}, | ||
"extensions": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"ms-dotnettools.csdevkit", | ||
"mutantdino.resourcemonitor", | ||
"humao.rest-client", | ||
"dzhavat.bracket-pair-toggler", | ||
"ms-azuretools.vscode-docker", | ||
"vivaxy.vscode-conventional-commits", | ||
"emmanuelbeziat.vscode-great-icons", | ||
"ms-vscode.vs-keybindings", | ||
"GitHub.vscode-github-actions", | ||
"PKief.material-icon-theme", | ||
"EditorConfig.EditorConfig", | ||
"DavidAnson.vscode-markdownlint", | ||
"IBM.output-colorizer", // Colorize your output/test logs | ||
"emmanuelbeziat.vscode-great-icons", | ||
"esbenp.prettier-vscode", | ||
"vscode-icons-team.vscode-icons", | ||
"redhat.vscode-yaml" | ||
] | ||
} | ||
}, | ||
"hostRequirements": { | ||
"cpus": 2, | ||
"memory": "8gb", | ||
"storage": "32gb" | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [5000, 5001], | ||
// "portsAttributes": { | ||
// "5001": { | ||
// "protocol": "https" | ||
// } | ||
// } | ||
// https://containers.dev/implementors/json_reference/#lifecycle-scripts | ||
"updateContentCommand": "chmod +x .devcontainer/scripts/update.sh", | ||
"postCreateCommand": "chmod +x .devcontainer/scripts/post-create.sh" | ||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# https://containers.dev/guide/dockerfile#docker-compose-image | ||
# https://containers.dev/guide/dockerfile#docker-compose-dockerfile | ||
services: | ||
devcontainer: | ||
build: | ||
context: . | ||
volumes: | ||
- ../..:/workspaces:rw,cached | ||
init: true | ||
command: sleep infinity | ||
|
||
# services: | ||
# devcontainer: | ||
# image: mcr.microsoft.com/devcontainers/dotnet:3.1.0 | ||
# volumes: | ||
# - ../..:/workspaces:cached | ||
# network_mode: service:db | ||
# command: sleep infinity | ||
|
||
# db: | ||
# image: postgres:latest | ||
# restart: unless-stopped | ||
# environment: | ||
# POSTGRES_PASSWORD: postgres | ||
# POSTGRES_USER: postgres | ||
# POSTGRES_DB: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eax | ||
|
||
# Run the setup_fonts.sh script | ||
./setup-fonts.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Download MesloLGM Nerd Font | ||
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Meslo.zip -O MesloLGM.zip | ||
|
||
# Extract the font files | ||
unzip MesloLGM.zip -d MesloLGM | ||
|
||
# Create the fonts directory if it doesn't exist | ||
mkdir -p ~/.local/share/fonts | ||
|
||
# Move the font files to the fonts directory | ||
mv MesloLGM/*.ttf ~/.local/share/fonts/ | ||
|
||
# Update the font cache | ||
fc-cache -fv | ||
|
||
# Clean up | ||
rm -rf MesloLGM.zip MesloLGM | ||
|
||
# Verify installation | ||
fc-list | grep "MesloLGM" | ||
|
||
echo "Font setup completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.100-preview.7.23376.3" | ||
"version": "8.0.303", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.