Skip to content
Merged
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
5 changes: 2 additions & 3 deletions src/coreclr/nativeaot/docs/Dockerfile.cross-build-x64-arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64
COPY --from=mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0-amd64 /usr/share/dotnet /usr/share/dotnet
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64
COPY --from=mcr.microsoft.com/dotnet/sdk:10.0 /usr/share/dotnet /usr/share/dotnet
ENV DOTNET_NOLOGO=true
5 changes: 2 additions & 3 deletions src/coreclr/nativeaot/docs/Dockerfile.cross-build-x64-x64
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64
COPY --from=mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0-amd64 /usr/share/dotnet /usr/share/dotnet
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64
COPY --from=mcr.microsoft.com/dotnet/sdk:10.0 /usr/share/dotnet /usr/share/dotnet
ENV DOTNET_NOLOGO=true
8 changes: 4 additions & 4 deletions src/coreclr/nativeaot/docs/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ For cloud native apps, build and runtime OS typically match, at least if you use

The .NET build has this exact same need. We produce several [container images to enable cross-building](https://github.com/dotnet/runtime/blob/main/docs/workflow/using-docker.md#the-official-runtime-docker-images).

You can use these images to build native AOT apps which work on distros as old as Ubuntu 16.04. These build images are not supported, but are expected to work (since we use them to build .NET on daily basis).
You can use these images to build native AOT apps which work on distros as old as Ubuntu 18.04 in .NET 10, see [Linux compatibility in release notes](https://github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md#linux-compatibility) for details. These build images are not supported, but are expected to work (since we use them to build .NET on daily basis).

### Containerized build

The following Dockerfiles demonstrate how to construct a working build environment that can be used for volume-mounted docker builds. They can be modified to use the other image flavors we provide, like Alpine.
The following Dockerfiles demonstrate how to construct a working build environment that can be used for volume-mounted docker builds. They can be modified to use the other .NET runtime versions or other image flavors we provide, like Alpine.

- [Dockerfile.cross-build-x64-arm64](Dockerfile.cross-build-x64-arm64)
- [Dockerfile.cross-build-x64-x64](Dockerfile.cross-build-x64-arm64)
- [Dockerfile.cross-build-x64-x64](Dockerfile.cross-build-x64-x64)

### x64

Expand Down Expand Up @@ -58,7 +58,7 @@ Hello, World!
The app can be tested in an old Linux container, again through volume mounting.

```bash
$ docker run --rm -v $(pwd)/app:/app -w /app ubuntu:16.04 ./cross-build-test
$ docker run --rm -v $(pwd)/app:/app -w /app ubuntu:18.04 ./cross-build-test
Hello, World!
```

Expand Down