Add support for mariner (#344)

This commit is contained in:
Mark Phippard 2022-12-19 11:25:32 -05:00 committed by GitHub
parent 9af65a01c7
commit fede405549
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -289,7 +289,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
# Get an adjusted ID independant of distro variants
if [ "${ID}" = "debian" ] || [ "${ID_LIKE}" = "debian" ]; then
ADJUSTED_ID="debian"
elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID_LIKE}" = *"rhel"* || "${ID_LIKE}" = *"fedora"* ]]; then
elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID}" = "mariner" || "${ID_LIKE}" = *"rhel"* || "${ID_LIKE}" = *"fedora"* || "${ID_LIKE}" = *"mariner"* ]]; then
ADJUSTED_ID="rhel"
elif [ "${ID}" = "alpine" ]; then
ADJUSTED_ID="alpine"

14
test/common-utils/mariner.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${ID}" = "mariner"
# Report result
reportResults

View file

@ -62,6 +62,13 @@
"common-utils": {}
}
},
"mariner": {
"image": "mcr.microsoft.com/cbl-mariner/base/core:2.0",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alpine": {
"image": "alpine",
"remoteUser": "devcontainer",