Skip to content

Commit c8955d7

Browse files
committed
Update devcontainer settings
1 parent da22fa2 commit c8955d7

File tree

2 files changed

+64
-42
lines changed

2 files changed

+64
-42
lines changed

Diff for: .devcontainer/devcontainer.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"dockerfile": "./Dockerfile",
66
"context": ".",
77
"args": {
8-
"VARIANT": "6.0-jammy"
9-
// Use this only if you need Razor support, until OmniSharp supports .NET 6 properly
10-
// "VARIANT": "6.0-focal"
8+
"VARIANT": "7.0"
119
}
1210
},
1311

@@ -25,24 +23,25 @@
2523

2624
"features": {
2725
// Uncomment the below to install Azure CLI
28-
"ghcr.io/devcontainers/features/azure-cli:1": {
29-
"version": "latest"
26+
"ghcr.io/devcontainers/features/azure-cli:latest": {
27+
"version": "latest",
28+
"extensions": "account,alias,deploy-to-azure,functionapp,subscription,webapp"
3029
},
3130

3231
// Uncomment the below to install GitHub CLI
33-
"ghcr.io/devcontainers/features/github-cli:1": {
32+
"ghcr.io/devcontainers/features/github-cli:latest": {
3433
"version": "latest"
3534
},
3635

3736
// Uncomment the below to install node.js
38-
"ghcr.io/devcontainers/features/node:1": {
37+
"ghcr.io/devcontainers/features/node:latest": {
3938
"version": "lts",
4039
"nodeGypDependencies": true,
4140
"nvmInstallPath": "/usr/local/share/nvm"
4241
},
4342

4443
// Install common utilities
45-
"ghcr.io/devcontainers/features/common-utils:1": {
44+
"ghcr.io/devcontainers/features/common-utils:latest": {
4645
"installZsh": true,
4746
"installOhMyZsh": true,
4847
"upgradePackages": true,
@@ -93,6 +92,8 @@
9392

9493
// Required extensions
9594
"GitHub.copilot",
95+
"GitHub.copilot-labs",
96+
"GitHub.copilot-chat",
9697
"ms-dotnettools.csharp",
9798
"ms-vscode.PowerShell",
9899
"ms-vscode.vscode-node-azure-pack",
@@ -118,7 +119,7 @@
118119
"explorer.sortOrder": "type",
119120
"explorer.fileNesting.enabled": true,
120121
"explorer.fileNesting.patterns": {
121-
"*.bicep": "${capture}.json",
122+
"*.bicep": "${capture}.json, ${capture}.parameters.json",
122123
"*.razor": "${capture}.razor.css",
123124
"*.js": "${capture}.js.map"
124125
}

Diff for: .devcontainer/post-create.sh

+54-33
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## Install additional apt packages
22
sudo apt-get update && \
3-
sudo apt-get install -y dos2unix
3+
sudo apt upgrade -y && \
4+
sudo apt-get install -y dos2unix libsecret-1-0 xdg-utils && \
5+
sudo apt clean -y && \
6+
sudo rm -rf /var/lib/apt/lists/*
47

58
## Configure git
69
git config --global pull.rebase false
@@ -18,14 +21,19 @@ wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCo
1821
unzip CascadiaCode.zip -d $HOME/.local/share/fonts
1922
rm CascadiaCode.zip
2023

24+
## GitHub Copilot CLI ##
25+
# Uncomment the below to install GitHub Copilot CLI.
26+
npm install -g @githubnext/github-copilot-cli
27+
eval "$(github-copilot-cli alias -- "$0")"
28+
2129
## AZURE CLI EXTENSIONS ##
2230
# Uncomment the below to install Azure CLI extensions
2331
# extensions=$(az extension list-available --query "[].name" | jq -c -r '.[]')
24-
extensions=(account alias deploy-to-azure functionapp subscription webapp)
25-
for extension in $extensions;
26-
do
27-
az extension add --name $extension
28-
done
32+
# extensions=(account alias deploy-to-azure functionapp subscription webapp)
33+
# for extension in $extensions;
34+
# do
35+
# az extension add --name $extension
36+
# done
2937

3038
## AZURE BICEP CLI ##
3139
# Uncomment the below to install Azure Bicep CLI.
@@ -58,29 +66,42 @@ npm install -g azurite
5866

5967
## OH-MY-ZSH PLUGINS & THEMES (POWERLEVEL10K) ##
6068
# Uncomment the below to install oh-my-zsh plugins and themes (powerlevel10k) without dotfiles integration
61-
# git clone https://github.com/zsh-users/zsh-completions.git $HOME/.oh-my-zsh/custom/plugins/zsh-completions
62-
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
63-
# git clone https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
69+
git clone https://github.com/zsh-users/zsh-completions.git $HOME/.oh-my-zsh/custom/plugins/zsh-completions
70+
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
71+
git clone https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
6472

65-
# git clone https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k --depth=1
66-
# ln -s $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme $HOME/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme
73+
git clone https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k --depth=1
74+
ln -s $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme $HOME/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme
6775

6876
## OH-MY-ZSH - POWERLEVEL10K SETTINGS ##
6977
# Uncomment the below to update the oh-my-zsh settings without dotfiles integration
70-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-with-clock.zsh > $HOME/.p10k-with-clock.zsh
71-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-without-clock.zsh > $HOME/.p10k-without-clock.zsh
72-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/switch-p10k-clock.sh > $HOME/switch-p10k-clock.sh
73-
# chmod +x ~/switch-p10k-clock.sh
74-
75-
# cp $HOME/.p10k-with-clock.zsh $HOME/.p10k.zsh
76-
# cp $HOME/.zshrc $HOME/.zshrc.bak
77-
78-
# echo "$(cat $HOME/.zshrc)" | awk '{gsub(/ZSH_THEME=\"codespaces\"/, "ZSH_THEME=\"powerlevel10k\"")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc
79-
# echo "$(cat $HOME/.zshrc)" | awk '{gsub(/plugins=\(git\)/, "plugins=(git zsh-completions zsh-syntax-highlighting zsh-autosuggestions)")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc
80-
# echo "
81-
# # To customize prompt, run 'p10k configure' or edit ~/.p10k.zsh.
82-
# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
83-
# " >> $HOME/.zshrc
78+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-with-clock.zsh > $HOME/.p10k-with-clock.zsh
79+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-without-clock.zsh > $HOME/.p10k-without-clock.zsh
80+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/switch-p10k-clock.sh > $HOME/switch-p10k-clock.sh
81+
chmod +x ~/switch-p10k-clock.sh
82+
83+
cp $HOME/.p10k-with-clock.zsh $HOME/.p10k.zsh
84+
cp $HOME/.zshrc $HOME/.zshrc.bak
85+
86+
echo "$(cat $HOME/.zshrc)" | awk '{gsub(/ZSH_THEME=\"codespaces\"/, "ZSH_THEME=\"powerlevel10k\"")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc
87+
echo "$(cat $HOME/.zshrc)" | awk '{gsub(/plugins=\(git\)/, "plugins=(git zsh-completions zsh-syntax-highlighting zsh-autosuggestions)")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc
88+
echo "
89+
# To customize prompt, run 'p10k configure' or edit ~/.p10k.zsh.
90+
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
91+
" >> $HOME/.zshrc
92+
93+
## GitHub Copilot CLI ##
94+
# Uncomment the below to add alias for GitHub Copilot CLI.
95+
echo '
96+
# Add GitHub Copilot CLI alias
97+
alias ghcp='github-copilot-cli'
98+
eval "$(github-copilot-cli alias -- "$0")"
99+
' >> $HOME/.zshrc
100+
echo '
101+
# Add GitHub Copilot CLI alias
102+
alias ghcp='github-copilot-cli'
103+
eval "$(github-copilot-cli alias -- "$0")"
104+
' >> $HOME/.bashrc
84105

85106
## OH-MY-POSH ##
86107
# Uncomment the below to install oh-my-posh
@@ -89,16 +110,16 @@ sudo chmod +x /usr/local/bin/oh-my-posh
89110

90111
## OH-MY-POSH - POWERLEVEL10K SETTINGS ##
91112
# Uncomment the below to update the oh-my-posh settings without dotfiles integration
92-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-with-clock.omp.json > $HOME/p10k-with-clock.omp.json
93-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-without-clock.omp.json > $HOME/p10k-without-clock.omp.json
94-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/switch-p10k-clock.ps1 > $HOME/switch-p10k-clock.ps1
113+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-with-clock.omp.json > $HOME/p10k-with-clock.omp.json
114+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-without-clock.omp.json > $HOME/p10k-without-clock.omp.json
115+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/switch-p10k-clock.ps1 > $HOME/switch-p10k-clock.ps1
95116

96-
# mkdir $HOME/.config/powershell
97-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1
98-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.VSCode_profile.ps1
117+
mkdir $HOME/.config/powershell
118+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1
119+
curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.VSCode_profile.ps1
99120

100-
# cp $HOME/p10k-with-clock.omp.json $HOME/p10k.omp.json
121+
cp $HOME/p10k-with-clock.omp.json $HOME/p10k.omp.json
101122

102123
## Azure Functions - local.settings.json ##
103124
# Uncomment the below to install local.settings.json file build without dotfiles integration
104-
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/azure-functions/Build-LocalSettingsJson.ps1 > $HOME/Build-LocalSettingsJson.ps1
125+
# curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/azure-functions/Build-LocalSettingsJson.ps1 > $HOME/Build-LocalSettingsJson.ps1

0 commit comments

Comments
 (0)