-
Notifications
You must be signed in to change notification settings - Fork 114
Description
There are a variety of patterns in use that are not correct or could be made more optimal.
Managed-only builds
We have large images that are intended for native builds. They get used for managed builds, too, which is massive overkill, but we don't offer anything better.
Referenced image Dockerfile: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/centos/stream8/Dockerfile
Some runtime repos use the build images for testing. Perhaps they would be satisfied with the same more minimal image.
The new image flavor be based on runtime-deps and add a few tools like git. That's what I'd expect to see at https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/amd64/Dockerfile (when we have an azure-linux/3.0 folder.
Cross builds
Some cross builds use old patterns.
We should stop producing these forms of image:
- https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/alpine/3.19/amd64/Dockerfile
- https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/alpine/3.19/WithNode/amd64/Dockerfile
- https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/cbl-mariner/2.0/amd64/Dockerfile
Varying targets
Some teams need separate targets. Today, the build targets Ubuntu 16.04. The referenced example targets Ubuntu 18.04. Could it just build in plain Mariner instead? Would that provide sufficient compatibility? We should understand the requirements.
sudo
Our images contain sudo. It would be very nice to remove it. It's hard to see that this is a good pattern.
We should revisit this too:
Python on Debian
Python is integrated into Debian more than other distros. This actually makes it more complicated for our use case. We don't appear to have an optimal pattern. We need to work on that more (and document it).
Helix and toolsets
There are lots of toolset packages in our helix images. Do we have use cases where they are used in helix?
Tagging scheme
The tagging scheme is a bit different for our two repo families, w/rt OS version. They should be the same.
mcr.microsoft.com/dotnet/runtime-deps:8.0-cbl-mariner2.0mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0