Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "azure-cli",
"version": "1.2.8",
"version": "1.2.9",
"name": "Azure CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
Expand Down
12 changes: 10 additions & 2 deletions src/azure-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ install_using_apt() {
# Import key safely (new 'signed-by' method rather than deprecated apt-key approach) and install
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/azure-cli/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/azure-cli.list
apt-get update

# This is a workaround for the fact that Azure CLI is not yet a supported package for debian trixie. Once Azure CLI is supported we should revert to avoid script failure for non Azure CLI packages
if ! (apt-get update); then
echo "(!) Failed to update apt cache, removing repository file"
rm -f /etc/apt/sources.list.d/azure-cli.list
else
echo "WARNING: apt-get update succeeded. The workaround for broken Azure CLI install on Debian Trixie may no longer be needed."
echo "TODO: Consider reverting to a simple `apt-get update` if the Azure CLI repo works reliably for debian trixie"
fi

if [ "${AZ_VERSION}" = "latest" ] || [ "${AZ_VERSION}" = "lts" ] || [ "${AZ_VERSION}" = "stable" ]; then
# Empty, meaning grab the "latest" in the apt repo
Expand Down Expand Up @@ -135,7 +143,7 @@ install_using_pip_strategy() {

install_with_pipx() {
echo "(*) Attempting to install globally with pipx..."
local ver="$1"
local ver="$1"
export
local

Expand Down
13 changes: 13 additions & 0 deletions test/azure-cli/install_azcli_dotnet_dockerindocker_trixie.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e

# Import test library for `check` command
source dev-container-features-test-lib

check "version" az --version

check "docker installed" bash -c "type docker"

# Report result
reportResults
21 changes: 18 additions & 3 deletions test/azure-cli/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"extensions": "aks-preview,amg,containerapp"
}
}
},
},
"install_extensions": {
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"user": "vscode",
Expand Down Expand Up @@ -39,7 +39,7 @@
}
}
},
"install_bicep_trixie": {
"install_bicep_trixie": {
"image": "mcr.microsoft.com/devcontainers/base:trixie",
"user": "vscode",
"features": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"installUsingPython": true
}
}
},
},
"install_with_python_3_12_bookworm": {
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"user": "vscode",
Expand All @@ -87,5 +87,20 @@
"installUsingPython": "true"
}
}
},
"install_azcli_dotnet_dockerindocker_trixie": {
"image": "mcr.microsoft.com/devcontainers/dotnet:dev-10.0-preview-trixie",
"user": "vscode",
"features": {
"azure-cli": {
"version": "latest"
},
"dotnet": {
"aspNetCoreRuntimeVersions": "8.0"
},
"docker-in-docker": {
"moby": false
}
}
}
}