dotnet / dotnet-buildtools-prereqs-docker

Used to maintain the Docker images hosted at the mcr.microsoft.com/dotnet-buildtools/prereqs image repository
MIT License
57 stars 103 forks source link

Add NodeJS to CBL mariner build containers #974

Closed mmitche closed 6 months ago

mmitche commented 7 months ago

Required for aspnetcore

dotnet-issue-labeler[bot] commented 7 months ago

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

mmitche commented 7 months ago

It's installing 16.20, so more work is needed here.

mmitche commented 6 months ago

Downloading the normal binary layout works fine.

mmitche commented 6 months ago

I need an expert here. I perhaps wrongly assumed that changing https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/crossdeps-builder/Dockerfile would then cascade to https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/cross/amd64/Dockerfile due to https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/cross/amd64/Dockerfile#L1 but that doesn't appear to be the case.

What am I missing?

mmitche commented 6 months ago

Note that mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-crossdeps did get node as expected.

MichaelSimons commented 6 months ago

The crossdeps-builder images is used to build the rootfs that is then copied in the final cross image. The key piece you missed is that the cross images are multi-staged images. see https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/cross/amd64/Dockerfile#L44.

MichaelSimons commented 6 months ago

Looks like you probably want to install NodeJS in https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/crossdeps/Dockerfile?

mmitche commented 6 months ago

https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/978