File tree Expand file tree Collapse file tree 4 files changed +44
-8
lines changed
Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Original file line number Diff line number Diff line change 3131if [ " ${ID} " = " alpine" ]; then
3232 apk add --no-cache bash
3333fi
34-
34+ if [ " ${ID} " = " azurelinux" ]; then
35+ tdnf install -y curl git
36+ fi
3537exec /bin/bash " $( dirname $0 ) /main.sh" " $@ "
3638exit $?
Original file line number Diff line number Diff line change @@ -161,12 +161,18 @@ install_redhat_packages() {
161161 local package_list=" "
162162 local remove_epel=" false"
163163 local install_cmd=microdnf
164- if ! type microdnf > /dev/null 2>&1 ; then
165- install_cmd=dnf
166- if ! type dnf > /dev/null 2>&1 ; then
167- install_cmd=yum
168- fi
169- fi
164+ if type microdnf > /dev/null 2>&1 ; then
165+ install_cmd=microdnf
166+ elif type tdnf > /dev/null 2>&1 ; then
167+ install_cmd=tdnf
168+ elif type dnf > /dev/null 2>&1 ; then
169+ install_cmd=dnf
170+ elif type yum > /dev/null 2>&1 ; then
171+ install_cmd=yum
172+ else
173+ echo " Unable to find 'tdnf', 'dnf', or 'yum' package manager. Exiting."
174+ exit 1
175+ fi
170176
171177 if [ " ${PACKAGES_ALREADY_INSTALLED} " != " true" ]; then
172178 package_list=" ${package_list} \
@@ -344,7 +350,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
344350# Get an adjusted ID independent of distro variants
345351if [ " ${ID} " = " debian" ] || [ " ${ID_LIKE} " = " debian" ]; then
346352 ADJUSTED_ID=" debian"
347- elif [[ " ${ID} " = " rhel" || " ${ID} " = " fedora" || " ${ID} " = " mariner" || " ${ID_LIKE} " = * " rhel" * || " ${ID_LIKE} " = * " fedora" * || " ${ID_LIKE} " = * " mariner" * ]]; then
353+ elif [[ " ${ID} " = " rhel" || " ${ID} " = " fedora" || " ${ID} " = " azurelinux " || " ${ID} " = " mariner" || " ${ID_LIKE} " = * " rhel" * || " ${ID_LIKE} " = * " fedora" * || " ${ID_LIKE} " = * " mariner" * ]]; then
348354 ADJUSTED_ID=" rhel"
349355 VERSION_CODENAME=" ${ID}${VERSION_ID} "
350356elif [ " ${ID} " = " alpine" ]; then
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Optional: Import test library
6+ source dev-container-features-test-lib
7+
8+ # Load Linux distribution info
9+ . /etc/os-release
10+
11+ # Check if the current user is root
12+ check " root user" test " $( whoami) " = " root"
13+
14+ # Check if the Linux distro is Azure Linux
15+ check " azurelinux distro" test " $ID " = " azurelinux"
16+
17+ # Definition specific tests
18+ check " curl" curl --version
19+ check " jq" jq --version
20+
21+ # Report result
22+ reportResults
Original file line number Diff line number Diff line change 292292 "features" : {
293293 "common-utils" : {}
294294 }
295+ },
296+ "Azure-linux-CU" : {
297+ "image" : " mcr.microsoft.com/dotnet/sdk:8.0-azurelinux3.0" ,
298+ "features" : {
299+ "common-utils" : {}
300+ }
295301 }
296302}
You can’t perform that action at this time.
0 commit comments