openEuler for self-contained .NET & ASP.NET apps.
388
The official Dotnet-deps(.NET Deps) docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current Dotnet-deps(.NET Deps) docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
The dotnet-deps(.NET Deps) image is for developers to layer standalone .NET and ASP.NET applications. It only contains the runtime dependencies required to run a standard self-contained .NET application: ca-certificates, glibc, libgcc, libicu, openssl-libs, libstdc++, tzdata, zlib.
Learn more about Dotnet-deps(.NET Deps) on learn.microsoft.com.
The tag of each dotnet-deps docker image is consist of the version of dotnet-deps and the version of basic image. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 8.0-oe2403sp4 | It includes the runtime dependencies required to run a standard self-contained .NET application of version 8.0.x on openEuler 24.03-LTS-SP4 | amd64, arm64 |
| 8.0-oe2203sp3 | It includes the runtime dependencies required to run a standard self-contained .NET application of version 8.0.x on openEuler 22.03-LTS-SP3 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements.
Pull the openeuler/dotnet-deps image from docker
docker pull openeuler/dotnet-deps:{Tag}
Start a dotnet-deps instance
docker run -d --name my-dotnet-deps openeuler/dotnet-deps:{Tag}
An example with HelloWorld application example
Obtain the dotnetcore-docs-hello-world source code and navigate to the root directory.
git clone https://github.com/Azure-Samples/dotnetcore-docs-hello-world
cd dotnetcore-docs-hello-world
Modify the dotnetcoresample.csproj file. Open the dotnetcoresample.csproj file and update it with the following content:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net{x.x}</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RuntimeIdentifiers>linux-x64;linux-arm64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
Replace {x.x} with the desired .NET version.
Publish the application.
dotnet publish -c Release -o /app -r linux-x64 --self-contained true
During execution, the following key information will be displayed:
Determining projects to restore...
All projects are up-to-date for restore.
dotnetcoresample -> /home/deps/dotnetcore-docs-hello-world/bin/Release/net{x.x}/linux-x64/dotnetcoresample.dll
dotnetcoresample -> /app/
Run the application using openeuler/dotnet-deps:{Tag}
docker run --rm -v /app:/app openeuler/dotnet-deps:{Tag} /app/dotnetcoresample
Note that the .NET version {x.x} used to publish the application must match the version specified by {Tag}.
View container running logs
docker logs -f my-dotnet-deps
To get an interactive shell
docker run -it --name my-dotnet-deps openeuler/dotnet-deps:{Tag} /bin/bash{Tag}
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.
Content type
Image
Digest
sha256:c59ad4b94…
Size
84.1 MB
Last updated
about 14 hours ago
docker pull openeuler/dotnet-deps:8.0-oe2403sp4Pulls:
9
Last week