SLE BCI ASP.NET 7.0 runtime
The ASP.NET Core Runtime 10.0 based on the SUSE Linux Enterprise Base Container Image. The .NET packages contained in this image come from a 3rd-party repository https://packages.microsoft.com/. You can find the respective source code in https://github.com/dotnet. SUSE does not provide any support or warranties.
Get Image
ASP.NET Core Runtime 10.0 container image
Description
.NET is a general purpose development platform. It is cross-platform, and can be used in devices, cloud, and embedded/IoT scenarios. You can use C# or F# to write .NET applications.
This image contains the ASP.NET Core and .NET runtimes and libraries, and it is optimized for running ASP.NET Core applications in production.
Notice
The .NET packages in the image come from a third-party repository packages.microsoft.com.
The source code is available on github.com/dotnet.
SUSE does not provide any support or warranties for the third-party components in the image.
Usage
To compile and deploy an application, copy the sources and build the binary:
FROM registry.suse.com/bci/dotnet-sdk:10.0 AS build
WORKDIR /source
# copy csproj and restore as distinct layers
COPY aspnetapp/*.csproj .
RUN dotnet restore
# copy and publish app and libraries
COPY aspnetapp/. .
RUN dotnet publish --no-restore -o /app
# final image
FROM registry.suse.com/bci/dotnet-aspnet:10.0
WORKDIR /app
COPY --from=build /app .
EXPOSE 8080
# uncomment to run as non-root user
# USER $APP_UID
ENTRYPOINT ["./aspnetapp"]
Build and run the container image:
podman build -t my-aspnet-app .
podman run -it --rm -p 8080:8080 my-aspnet-app
HTTPS and certificates
ASP.NET Core uses HTTPS by default. You need a valid certificate for production deployments.
To create a self-signed certificate for testing, use the following command:
podman run --rm -it -v "$PWD/https":/https:Z \
registry.suse.com/bci/dotnet-sdk:10.0 \
dotnet dev-certs https -ep /https/aspnetapp.pfx -p <PASSWORD>
To use a certificate and run the container image with ASP.NET Core configured for HTTPS in development or production, use the following command:
podman run --rm -it -p 8081:8081 \
-e ASPNETCORE_HTTPS_PORTS=8081 \
-e ASPNETCORE_Kestrel__Certificates__Default__Password="<PASSWORD>" \
-e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx \
-v "$PWD/https":/https:Z my-aspnet-app
Globalization
.NET includes globalization capabilities, including support for processing natural language text, calendars, currency, and timezones. The .NET implementation for these capabilities is based on system libraries available in the container image, such as International Components for Unicode (ICU) and tzdata.
It's considered a good practice to pass timezone information into a container via environment variable TZ.
podman run --rm -it -e TZ="Europe/Berlin" app
Licensing
SPDX-License-Identifier: MIT
This documentation and the build recipe are licensed as MIT. The container itself contains various software components under various open source licenses listed in the associated Software Bill of Materials (SBOM).
This image is based on SLE BCI, a stable and redistributable foundation for software innovation. SLE BCI is enterprise-ready, and it comes with an option for support.
See the SLE BCI EULA for further information.
-
Image Data
Last Built: 30 Oct 22:59 UTC
Compressed Size: 110.2 MB
Uncompressed Size: 270.8 MB
Support Level: L2
Supported until: 12 Nov 2028
-
-
Health Index
D0:C4:H0:M0:L0:ULast Scan:
about 14 hours ago