-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1589 from SUSE/for-deploy-7
🤖: Update build recipes for SP7
- Loading branch information
Showing
64 changed files
with
3,177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Copyright (c) 2024 SUSE LLC | ||
|
||
# All modifications and additions to the file contributed by third parties | ||
# remain the property of their copyright owners, unless otherwise agreed | ||
# upon. | ||
|
||
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. | ||
# It is maintained by the BCI team and generated by | ||
# https://github.com/SUSE/BCI-dockerfile-generator | ||
|
||
# Please submit bugfixes or comments via https://bugs.opensuse.org/ | ||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions | ||
|
||
#!ExclusiveArch: x86_64 | ||
#!BuildTag: bci/dotnet-aspnet:6.0 | ||
#!BuildTag: bci/dotnet-aspnet:6.0-%RELEASE% | ||
#!BuildTag: bci/dotnet-aspnet:6.0.33 | ||
#!BuildTag: bci/dotnet-aspnet:6.0.33-%RELEASE% | ||
#!BuildName: bci-dotnet-aspnet-6.0 | ||
#!BuildVersion: 15.7.6.0 | ||
FROM bci/bci-base:15.7 | ||
|
||
|
||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=com.suse.bci.dotnet.aspnet | ||
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" | ||
LABEL org.opencontainers.image.title="SLE BCI ASP.NET Core Runtime 6.0" | ||
LABEL org.opencontainers.image.description="The ASP.NET Core Runtime 6.0 based on the SLE Base Container Image. The .NET packages contained in this image come from a 3rd-party repository http://packages.microsoft.com. You can find the respective source code in https://github.com/dotnet. SUSE doesn't provide any support or warranties." | ||
LABEL org.opencontainers.image.version="6.0" | ||
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="SUSE LLC" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opencontainers.image.ref.name="6.0-%RELEASE%" | ||
LABEL org.opensuse.reference="registry.suse.com/bci/dotnet-aspnet:6.0-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL com.suse.supportlevel="techpreview" | ||
LABEL com.suse.supportlevel.until="2024-11-12" | ||
LABEL com.suse.eula="sle-bci" | ||
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" | ||
LABEL com.suse.release-stage="beta" | ||
# endlabelprefix | ||
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md" | ||
|
||
|
||
RUN mkdir -p /tmp/ | ||
|
||
#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-host-6.0.33-1.x86_64.rpm | ||
COPY dotnet-host-6.0.33-1.x86_64.rpm /tmp/ | ||
#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-hostfxr-6.0-6.0.33-1.x86_64.rpm | ||
COPY dotnet-hostfxr-6.0-6.0.33-1.x86_64.rpm /tmp/ | ||
#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-runtime-deps-6.0-6.0.33-1.x86_64.rpm | ||
COPY dotnet-runtime-deps-6.0-6.0.33-1.x86_64.rpm /tmp/ | ||
#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-runtime-6.0-6.0.33-1.x86_64.rpm | ||
COPY dotnet-runtime-6.0-6.0.33-1.x86_64.rpm /tmp/ | ||
#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/a/aspnetcore-runtime-6.0-6.0.33-1.x86_64.rpm | ||
COPY aspnetcore-runtime-6.0-6.0.33-1.x86_64.rpm /tmp/ | ||
|
||
|
||
# Workaround for https://github.com/openSUSE/obs-build/issues/487 | ||
RUN zypper --non-interactive install --no-recommends sles-release | ||
|
||
# Importing MS GPG keys | ||
COPY microsoft.asc /tmp | ||
RUN rpm --import /tmp/microsoft.asc | ||
|
||
RUN zypper --non-interactive install --no-recommends libicu libopenssl1_1 /tmp/*rpm | ||
|
||
COPY prod.repo /etc/zypp/repos.d/microsoft-dotnet-prod.repo | ||
COPY dotnet-host.check /etc/zypp/systemCheck.d/dotnet-host.check | ||
|
||
RUN rm -rf /tmp/* && zypper clean && rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# ASP.NET Core Runtime 6.0 container image | ||
|
||
![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)![Support Level](https://img.shields.io/badge/Support_Level-techpreview-blue)[![SLSA](https://img.shields.io/badge/SLSA_(v1.0)-Build_L3-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/) | ||
[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify) | ||
|
||
## 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](https://packages.microsoft.com). | ||
|
||
The source code is available on [github.com/dotnet](https://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: | ||
|
||
```Dockerfile | ||
FROM registry.suse.com/bci/dotnet-sdk:6.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:6.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: | ||
|
||
```ShellSession | ||
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](https://docs.microsoft.com/aspnet/core/security/enforcing-ssl). | ||
You need a valid certificate for production deployments. | ||
|
||
To create a self-signed certificate for testing, use the following command: | ||
|
||
```ShellSession | ||
podman run --rm -it -v "$PWD/https":/https:Z \ | ||
registry.suse.com/bci/dotnet-sdk:6.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: | ||
|
||
```ShellSession | ||
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-apsnet-app | ||
``` | ||
|
||
## Globalization | ||
|
||
.NET includes [globalization](https://learn.microsoft.com/dotnet/core/extensions/globalization-and-localization) 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)](https://icu.unicode.org/) and [tzdata](https://wikipedia.org/wiki/Tz_database). | ||
|
||
It's considered a good practice to pass timezone information into a container via environment variable `TZ`. | ||
|
||
```bash | ||
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 a tech preview. Do not use it for production. | ||
Your feedback is welcome. | ||
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<constraints> | ||
<hardware> | ||
<disk> | ||
<size unit="G">8</size> | ||
</disk> | ||
</hardware> | ||
</constraints> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
</services> |
Oops, something went wrong.