Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oryx unpin dotnet version and install using apt #991

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
11 changes: 6 additions & 5 deletions src/oryx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ echo "Installing Oryx..."
export DEBIAN_FRONTEND=noninteractive

# Install dependencies
check_packages git sudo curl ca-certificates apt-transport-https gnupg2 dirmngr libc-bin moreutils
check_packages git sudo curl ca-certificates apt-transport-https gnupg2 dirmngr libc-bin moreutils

if ! cat /etc/group | grep -e "^oryx:" > /dev/null 2>&1; then
groupadd -r oryx
Expand All @@ -156,20 +156,21 @@ PATCH_VERSION_ID=$(echo $(dotnet --version) | cut -d . -f 3)

PINNED_SDK_VERSION=""
# Oryx needs to be built with .NET 8
if [[ "${DOTNET_BINARY}" = "" ]] || [[ $MAJOR_VERSION_ID != "8" ]] || [[ $MAJOR_VERSION_ID = "8" && ${PATCH_VERSION_ID} -ge "101" ]] ; then
if [[ "${DOTNET_BINARY}" = "" ]] || [[ $MAJOR_VERSION_ID != "8" ]] ; then
echo "'dotnet 8' was not detected. Attempting to install .NET 8 to build oryx."

# The oryx build fails with .Net 8.0.201, see https://github.com/devcontainers/images/issues/974
# Pinning it to a working version until the upstream Oryx repo updates the dependency
# install_dotnet_using_apt
PINNED_SDK_VERSION="8.0.101"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at https://github.com/devcontainers/features/actions/runs/9348034682/job/25726319177?pr=991#step:4:914 doesn't seem like we can get rid of this just yet.

Let's move this to a draft PR and open back once the tests are 🟢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

converted this PR to Draft mode. will revisit when the dependent packages are up-to-date for this migration.

install_dotnet_with_script ${PINNED_SDK_VERSION}
install_dotnet_using_apt
# PINNED_SDK_VERSION="8.0.101"
# install_dotnet_with_script ${PINNED_SDK_VERSION}

if ! dotnet --version > /dev/null ; then
echo "(!) Please install Dotnet before installing Oryx"
exit 1
fi

DOTNET_BINARY="/usr/bin/dotnet"
fi

BUILD_SCRIPT_GENERATOR=/usr/local/buildscriptgen
Expand Down
Loading