-
Notifications
You must be signed in to change notification settings - Fork 107
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
Conversation
@@ -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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Converting to a draft while I determine a better approach. |
Closing - I determined that the MicroBuild team will have to make a change on their end for the install to work correctly. |
Related to dotnet/arcade#14431
Example pipeline run with failures to install MicroBuild (see Linux legs) (internal Microsoft link)
The
Install MicroBuild Plugin
step runssudo apt install nuget
. This step fails in some of the Linux legs becausesudo
and/orapt
are missing from the dockerfiles. This PR adds these.Needed for dotnet/aspnetcore#58191