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
Closed
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
1 change: 1 addition & 0 deletions src/alpine/3.19/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.

autoconf \
automake \
bash \
Expand Down
1 change: 1 addition & 0 deletions src/alpine/3.20/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM amd64/alpine:3.20

# Install .NET and test dependencies
RUN apk add --upgrade --no-cache \
apt \
autoconf \
automake \
bash \
Expand Down
3 changes: 3 additions & 0 deletions src/cbl-mariner/2.0/crossdeps/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.

# Provides 'su', required by Azure DevOps
ca-certificates \
git \
Expand Down
3 changes: 3 additions & 0 deletions src/cbl-mariner/2.0/fpm/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ RUN tdnf install -y \
# Provides functionality for AzureCLI AzDO task
powershell \
azure-cli \
# Needed to install MicroBuild in Azure DevOps pipelines
sudo \
apt \
&& tdnf clean all \
&& gem install fpm
Loading