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 31
31
if [ " ${ID} " = " alpine" ]; then
32
32
apk add --no-cache bash
33
33
fi
34
-
34
+ if [ " ${ID} " = " azurelinux" ]; then
35
+ tdnf install -y curl git
36
+ fi
35
37
exec /bin/bash " $( dirname $0 ) /main.sh" " $@ "
36
38
exit $?
Original file line number Diff line number Diff line change @@ -161,12 +161,18 @@ install_redhat_packages() {
161
161
local package_list=" "
162
162
local remove_epel=" false"
163
163
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
170
176
171
177
if [ " ${PACKAGES_ALREADY_INSTALLED} " != " true" ]; then
172
178
package_list=" ${package_list} \
@@ -344,7 +350,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
344
350
# Get an adjusted ID independent of distro variants
345
351
if [ " ${ID} " = " debian" ] || [ " ${ID_LIKE} " = " debian" ]; then
346
352
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
348
354
ADJUSTED_ID=" rhel"
349
355
VERSION_CODENAME=" ${ID}${VERSION_ID} "
350
356
elif [ " ${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 292
292
"features" : {
293
293
"common-utils" : {}
294
294
}
295
+ },
296
+ "Azure-linux-CU" : {
297
+ "image" : " mcr.microsoft.com/dotnet/sdk:8.0-azurelinux3.0" ,
298
+ "features" : {
299
+ "common-utils" : {}
300
+ }
295
301
}
296
302
}
You can’t perform that action at this time.
0 commit comments