Skip to content
Open
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/oryx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installs the oryx CLI

```json
"features": {
"ghcr.io/devcontainers/features/oryx:1": {}
"ghcr.io/devcontainers/features/oryx:2": {}
}
```

Expand Down
4 changes: 2 additions & 2 deletions src/oryx/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "oryx",
"version": "1.4.1",
"version": "2.0.0",
"name": "Oryx",
"description": "Installs the oryx CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/oryx",
Expand All @@ -10,7 +10,7 @@
"DYNAMIC_INSTALL_ROOT_DIR": "/opt",
"ORYX_PREFER_USER_INSTALLED_SDKS": "true",
"ORYX_DIR": "/usr/local/oryx",
"DEBIAN_FLAVOR": "focal-scm",
"DEBIAN_FLAVOR": "bookworm",
"PATH": "/usr/local/oryx:${PATH}"
},
"customizations": {
Expand Down
2 changes: 1 addition & 1 deletion src/oryx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mkdir -p "${ORYX_INSTALL_DIR}"
PIP_CACHE_DIR="/usr/local/share/pip-cache/lib"
mkdir -p ${PIP_CACHE_DIR}

updaterc "export ORYX_SDK_STORAGE_BASE_URL=https://oryx-cdn.microsoft.io && export ENABLE_DYNAMIC_INSTALL=true && DYNAMIC_INSTALL_ROOT_DIR=$ORYX_INSTALL_DIR && ORYX_PREFER_USER_INSTALLED_SDKS=true && export DEBIAN_FLAVOR=focal-scm"
updaterc "export ORYX_SDK_STORAGE_BASE_URL=https://oryx-cdn.microsoft.io && export ENABLE_DYNAMIC_INSTALL=true && DYNAMIC_INSTALL_ROOT_DIR=$ORYX_INSTALL_DIR && ORYX_PREFER_USER_INSTALLED_SDKS=true && export DEBIAN_FLAVOR=bookworm"

chown -R "${USERNAME}:oryx" "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}" "${PIP_CACHE_DIR}"
chmod -R g+r+w "${ORYX_INSTALL_DIR}" "${BUILD_SCRIPT_GENERATOR}" "${ORYX}" "${PIP_CACHE_DIR}"
Expand Down
32 changes: 13 additions & 19 deletions test/oryx/install_dotnet_and_oryx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,33 @@ check "Oryx version" oryx --version
check "Dotnet is not removed if it is not installed by the Oryx Feature" dotnet --version

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx" ls /opt/dotnet/ | grep 2.1
check "oryx-install-dotnet-10.0" oryx prep --skip-detection --platforms-and-versions dotnet=10.0.4
check "dotnet-10-installed-by-oryx" ls /opt/dotnet/ | grep 10.0

check "oryx-install-nodejs-12.22.11" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-nodejs-24.13.0" oryx prep --skip-detection --platforms-and-versions nodejs=24.13.0
check "nodejs-24.13.0-installed-by-oryx" ls /opt/nodejs/ | grep 24.13.0

check "oryx-install-php-7.3.25" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx" ls /opt/php/ | grep 7.3.25

check "oryx-install-java-12.0.2" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.5.1" oryx prep --skip-detection --platforms-and-versions php=8.5.1
check "php-8.5.1-installed-by-oryx" ls /opt/php/ | grep 8.5.1

# Replicates Oryx's behavior for universal image
mkdir -p /opt/oryx
echo "vso-focal" >> /opt/oryx/.imagetype
echo "vso-bookworm" >> /opt/oryx/.imagetype

mkdir -p /opt/dotnet/lts
cp -R /usr/share/dotnet/dotnet /opt/dotnet/lts
cp -R /usr/share/dotnet/LICENSE.txt /opt/dotnet/lts
cp -R /usr/share/dotnet/ThirdPartyNotices.txt /opt/dotnet/lts

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1-universal" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx-universal" ls /opt/dotnet/ | grep 2.1

check "oryx-install-nodejs-12.22.11-universal" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx-universal" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-dotnet-10.0" oryx prep --skip-detection --platforms-and-versions dotnet=10.0.4
check "dotnet-10-installed-by-oryx" ls /opt/dotnet/ | grep 10.0

check "oryx-install-php-7.3.25-universal" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx-universal" ls /opt/php/ | grep 7.3.25
check "oryx-install-nodejs-24.13.0" oryx prep --skip-detection --platforms-and-versions nodejs=24.13.0
check "nodejs-24.13.0-installed-by-oryx" ls /opt/nodejs/ | grep 24.13.0

check "oryx-install-java-12.0.2-universal" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx-universal" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.5.1" oryx prep --skip-detection --platforms-and-versions php=8.5.1
check "php-8.5.1-installed-by-oryx" ls /opt/php/ | grep 8.5.1

# Report result
reportResults
32 changes: 13 additions & 19 deletions test/oryx/install_older_dotnet_and_oryx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,33 @@ check "Oryx version" oryx --version
check "Dotnet is not removed if it is not installed by the Oryx Feature" dotnet --version

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx" ls /opt/dotnet/ | grep 2.1
check "oryx-install-dotnet-6.0" oryx prep --skip-detection --platforms-and-versions dotnet=6.0.23
check "dotnet-6-installed-by-oryx" ls /opt/dotnet/ | grep 6.0

check "oryx-install-nodejs-12.22.11" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-nodejs-20.11.0" oryx prep --skip-detection --platforms-and-versions nodejs=20.11.0
check "nodejs-20.11.0-installed-by-oryx" ls /opt/nodejs/ | grep 20.11.0

check "oryx-install-php-7.3.25" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx" ls /opt/php/ | grep 7.3.25

check "oryx-install-java-12.0.2" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.1.22" oryx prep --skip-detection --platforms-and-versions php=8.1.22
check "php-8.1.22-installed-by-oryx" ls /opt/php/ | grep 8.1.22

# Replicates Oryx's behavior for universal image
mkdir -p /opt/oryx
echo "vso-focal" >> /opt/oryx/.imagetype
echo "vso-bookworm" >> /opt/oryx/.imagetype

mkdir -p /opt/dotnet/lts
cp -R /usr/share/dotnet/dotnet /opt/dotnet/lts
cp -R /usr/share/dotnet/LICENSE.txt /opt/dotnet/lts
cp -R /usr/share/dotnet/ThirdPartyNotices.txt /opt/dotnet/lts

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1-universal" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx-universal" ls /opt/dotnet/ | grep 2.1

check "oryx-install-nodejs-12.22.11-universal" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx-universal" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-dotnet-6.0" oryx prep --skip-detection --platforms-and-versions dotnet=6.0.23
check "dotnet-6-installed-by-oryx" ls /opt/dotnet/ | grep 6.0

check "oryx-install-php-7.3.25-universal" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx-universal" ls /opt/php/ | grep 7.3.25
check "oryx-install-nodejs-20.11.0" oryx prep --skip-detection --platforms-and-versions nodejs=20.11.0
check "nodejs-20.11.0-installed-by-oryx" ls /opt/nodejs/ | grep 20.11.0

check "oryx-install-java-12.0.2-universal" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx-universal" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.1.22" oryx prep --skip-detection --platforms-and-versions php=8.1.22
check "php-8.1.22-installed-by-oryx" ls /opt/php/ | grep 8.1.22

# Report result
reportResults
32 changes: 13 additions & 19 deletions test/oryx/install_prev_dotnet_and_oryx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,33 @@ check "Oryx version" oryx --version
check "Dotnet is not removed if it is not installed by the Oryx Feature" dotnet --version

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx" ls /opt/dotnet/ | grep 2.1
check "oryx-install-dotnet-9.0" oryx prep --skip-detection --platforms-and-versions dotnet=9.0.1
check "dotnet-9-installed-by-oryx" ls /opt/dotnet/ | grep 9.0

check "oryx-install-nodejs-12.22.11" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-nodejs-22.9.0" oryx prep --skip-detection --platforms-and-versions nodejs=22.9.0
check "nodejs-22.9.0-installed-by-oryx" ls /opt/nodejs/ | grep 22.9.0

check "oryx-install-php-7.3.25" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx" ls /opt/php/ | grep 7.3.25

check "oryx-install-java-12.0.2" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.3.20" oryx prep --skip-detection --platforms-and-versions php=8.3.20
check "php-8.3.20-installed-by-oryx" ls /opt/php/ | grep 8.3.20

# Replicates Oryx's behavior for universal image
mkdir -p /opt/oryx
echo "vso-focal" >> /opt/oryx/.imagetype
echo "vso-bookworm" >> /opt/oryx/.imagetype

mkdir -p /opt/dotnet/lts
cp -R /usr/share/dotnet/dotnet /opt/dotnet/lts
cp -R /usr/share/dotnet/LICENSE.txt /opt/dotnet/lts
cp -R /usr/share/dotnet/ThirdPartyNotices.txt /opt/dotnet/lts

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1-universal" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx-universal" ls /opt/dotnet/ | grep 2.1

check "oryx-install-nodejs-12.22.11-universal" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx-universal" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-dotnet-9.0" oryx prep --skip-detection --platforms-and-versions dotnet=9.0.1
check "dotnet-9-installed-by-oryx" ls /opt/dotnet/ | grep 9.0

check "oryx-install-php-7.3.25-universal" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx-universal" ls /opt/php/ | grep 7.3.25
check "oryx-install-nodejs-22.9.0" oryx prep --skip-detection --platforms-and-versions nodejs=22.9.0
check "nodejs-22.9.0-installed-by-oryx" ls /opt/nodejs/ | grep 22.9.0

check "oryx-install-java-12.0.2-universal" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx-universal" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.3.20" oryx prep --skip-detection --platforms-and-versions php=8.3.20
check "php-8.3.20-installed-by-oryx" ls /opt/php/ | grep 8.3.20

# Report result
reportResults
10 changes: 5 additions & 5 deletions test/oryx/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"install_dotnet_and_oryx": {
"image": "ubuntu:noble",
"image": "mcr.microsoft.com/devcontainers/base:noble",
"features": {
"dotnet": {
"version": "8.0",
"dotnetRuntimeVersions": "7.0",
"aspNetCoreRuntimeVersions": "7.0"
"version": "10.0",
"dotnetRuntimeVersions": "9.0",
"aspNetCoreRuntimeVersions": "9.0"
},
"oryx": {}
}
Expand All @@ -23,7 +23,7 @@
"image": "ubuntu:noble",
"features": {
"dotnet": {
"version": "6.0"
"version": "8.0"
},
"oryx": {}
}
Expand Down
15 changes: 6 additions & 9 deletions test/oryx/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ check "ORYX_SDK_STORAGE_BASE_URL" echo $ORYX_SDK_STORAGE_BASE_URL
check "ENABLE_DYNAMIC_INSTALL" echo $ENABLE_DYNAMIC_INSTALL

# Install platforms with oryx build tool
check "oryx-install-dotnet-2.1" oryx prep --skip-detection --platforms-and-versions dotnet=2.1.30
check "dotnet-2-installed-by-oryx" ls /opt/dotnet/ | grep 2.1
check "oryx-install-dotnet-8.0" oryx prep --skip-detection --platforms-and-versions dotnet=8.0.23
check "dotnet-2-installed-by-oryx" ls /opt/dotnet/ | grep 8.0

check "oryx-install-nodejs-12.22.11" oryx prep --skip-detection --platforms-and-versions nodejs=12.22.11
check "nodejs-12.22.11-installed-by-oryx" ls /opt/nodejs/ | grep 12.22.11
check "oryx-install-nodejs-20.11.0" oryx prep --skip-detection --platforms-and-versions nodejs=20.11.0
check "nodejs-20.11.0-installed-by-oryx" ls /opt/nodejs/ | grep 20.11.0

check "oryx-install-php-7.3.25" oryx prep --skip-detection --platforms-and-versions php=7.3.25
check "php-7.3.25-installed-by-oryx" ls /opt/php/ | grep 7.3.25

check "oryx-install-java-12.0.2" oryx prep --skip-detection --platforms-and-versions java=12.0.2
check "java-12.0.2-installed-by-oryx" ls /opt/java/ | grep 12.0.2
check "oryx-install-php-8.1.30" oryx prep --skip-detection --platforms-and-versions php=8.1.30
check "php-8.1.30-installed-by-oryx" ls /opt/php/ | grep 8.1.30

# Report result
reportResults
Loading