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

Add sudo and apt for MicroBuild install in aspnetcore pipelines #1208

Closed
wants to merge 1 commit into from

Conversation

ellahathaway
Copy link
Member

Related to dotnet/arcade#14431

Example pipeline run with failures to install MicroBuild (see Linux legs) (internal Microsoft link)

The Install MicroBuild Plugin step runs sudo apt install nuget. This step fails in some of the Linux legs because sudo and/or apt are missing from the dockerfiles. This PR adds these.

Needed for dotnet/aspnetcore#58191

@@ -2,6 +2,9 @@ FROM mcr.microsoft.com/cbl-mariner/base/core:2.0

RUN tdnf update -y && \
tdnf install -y \
# Needed to install MicroBuild in Azure DevOps pipelines
sudo \
Copy link
Member

Choose a reason for hiding this comment

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

As a rule, we don't want to install sudo in new images. I would hope that the MicroBuild script would check to see whether the nuget package is installed before installing it. In that case, the right thing to do would be to install the nuget package here instead.

@@ -2,6 +2,9 @@ FROM mcr.microsoft.com/cbl-mariner/base/core:2.0

RUN tdnf update -y && \
tdnf install -y \
# Needed to install MicroBuild in Azure DevOps pipelines
sudo \
apt \
Copy link
Member

Choose a reason for hiding this comment

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

There is no apt package in Mariner. It uses tdnf as its package manager. The MicroBuild script should support that if it doesn't already.

@@ -2,6 +2,7 @@ FROM amd64/alpine:3.19

# Install .NET and test dependencies
RUN apk add --upgrade --no-cache \
apt \
Copy link
Member

Choose a reason for hiding this comment

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

I don't know what this package is but it doesn't give you an apt command. The package manager for Alpine is apk. The MicroBuild script should support that if it doesn't already.

Copy link
Member Author

@ellahathaway ellahathaway Oct 3, 2024

Choose a reason for hiding this comment

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

Ah okay yeah the MicroBuild install script fails because it tries to install nuget via sudo apt install nuget. I'll see if I can find a workaround, and if not I'll file an issue against them for this.

@ellahathaway ellahathaway marked this pull request as draft October 3, 2024 19:54
@ellahathaway
Copy link
Member Author

Converting to a draft while I determine a better approach.

@ellahathaway
Copy link
Member Author

Closing - I determined that the MicroBuild team will have to make a change on their end for the install to work correctly.

@ellahathaway ellahathaway deleted the microbuild-deps branch October 14, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants