|
| 1 | +# SPDX-License-Identifier: MIT |
| 2 | + |
| 3 | +# Copyright (c) 2025 SUSE LLC |
| 4 | + |
| 5 | +# All modifications and additions to the file contributed by third parties |
| 6 | +# remain the property of their copyright owners, unless otherwise agreed |
| 7 | +# upon. |
| 8 | + |
| 9 | +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. |
| 10 | +# It is maintained by the BCI team and generated by |
| 11 | +# https://github.com/SUSE/BCI-dockerfile-generator |
| 12 | + |
| 13 | +# Please submit bugfixes or comments via https://bugs.opensuse.org/ |
| 14 | +# You can contact the BCI team via https://github.com/SUSE/bci/discussions |
| 15 | + |
| 16 | +#!UseOBSRepositories |
| 17 | +#!ExclusiveArch: x86_64 |
| 18 | +#!BuildTag: bci/dotnet-aspnet:10.0.0-%RELEASE% |
| 19 | +#!BuildTag: bci/dotnet-aspnet:10.0.0 |
| 20 | +#!BuildTag: bci/dotnet-aspnet:10.0 |
| 21 | +#!BuildTag: bci/dotnet-aspnet:latest |
| 22 | +#!BuildName: bci-dotnet-aspnet-10.0 |
| 23 | +#!BuildVersion: 15.7.10.0 |
| 24 | +FROM registry.suse.com/bci/bci-base:15.7 |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +# set the day of last password change to empty |
| 29 | +RUN set -euo pipefail; sed -i 's/^\([^:]*:[^:]*:\)[^:]*\(:.*\)$/\1\2/' /etc/shadow |
| 30 | + |
| 31 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 32 | +# labelprefix=com.suse.bci.dotnet.aspnet |
| 33 | +LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" |
| 34 | +LABEL org.opencontainers.image.title="SLE BCI ASP.NET Core Runtime 10.0" |
| 35 | +LABEL org.opencontainers.image.description="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 http://packages.microsoft.com. You can find the respective source code in https://github.com/dotnet. SUSE doesn't provide any support or warranties." |
| 36 | +LABEL org.opencontainers.image.version="10.0.0" |
| 37 | +LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" |
| 38 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 39 | +LABEL org.opencontainers.image.vendor="SUSE LLC" |
| 40 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 41 | +LABEL org.opencontainers.image.ref.name="10.0.0-%RELEASE%" |
| 42 | +LABEL org.opensuse.reference="registry.suse.com/bci/dotnet-aspnet:10.0.0-%RELEASE%" |
| 43 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 44 | +LABEL com.suse.supportlevel="techpreview" |
| 45 | +LABEL com.suse.supportlevel.until="2028-11-12" |
| 46 | +LABEL com.suse.eula="sle-bci" |
| 47 | +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" |
| 48 | +LABEL com.suse.release-stage="released" |
| 49 | +# endlabelprefix |
| 50 | +LABEL org.opencontainers.image.base.name="%BASE_REFNAME%" |
| 51 | +LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%" |
| 52 | +LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%" |
| 53 | + |
| 54 | + |
| 55 | +RUN mkdir -p /tmp/ |
| 56 | + |
| 57 | +#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-host-10.0.0-1.x86_64.rpm sha256:0367de591ce206589496d4c1489dfaeec748a0cbab2612cd64087de4d92a90dd |
| 58 | +COPY dotnet-host-10.0.0-1.x86_64.rpm /tmp/ |
| 59 | +#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-hostfxr-10.0-10.0.0-1.x86_64.rpm sha256:6541a4345ba7c0efed58d932c47470a55f906125222c3f634e0f59dee290ded7 |
| 60 | +COPY dotnet-hostfxr-10.0-10.0.0-1.x86_64.rpm /tmp/ |
| 61 | +#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-runtime-deps-10.0-10.0.0-1.x86_64.rpm sha256:987ac9d24088187d2b2bead6e81f0d3f58705db7a104c8326e5077245224ebc6 |
| 62 | +COPY dotnet-runtime-deps-10.0-10.0.0-1.x86_64.rpm /tmp/ |
| 63 | +#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/d/dotnet-runtime-10.0-10.0.0-1.x86_64.rpm sha256:aa7eb160c0e20dd7a4b2070b962062b7850d1a9c660d51ae5186650cef648bef |
| 64 | +COPY dotnet-runtime-10.0-10.0.0-1.x86_64.rpm /tmp/ |
| 65 | +#!RemoteAssetUrl: https://packages.microsoft.com/sles/15/prod/Packages/a/aspnetcore-runtime-10.0-10.0.0-1.x86_64.rpm sha256:a0dc272d0111dcc82769352b91c5f4d70549f6d8cdfa146ed5bbb49d44d3acbe |
| 66 | +COPY aspnetcore-runtime-10.0-10.0.0-1.x86_64.rpm /tmp/ |
| 67 | + |
| 68 | + |
| 69 | +# Workaround for https://github.com/openSUSE/obs-build/issues/487 |
| 70 | +RUN zypper --non-interactive install --no-recommends coreutils sles-release |
| 71 | + |
| 72 | +# Importing MS GPG keys |
| 73 | +COPY microsoft.asc /tmp |
| 74 | +RUN rpm --import /tmp/microsoft.asc |
| 75 | + |
| 76 | +RUN zypper --non-interactive install --no-recommends libicu libopenssl1_1 /tmp/*rpm |
| 77 | + |
| 78 | +COPY prod.repo /etc/zypp/repos.d/microsoft-dotnet-prod.repo |
| 79 | +COPY dotnet-host.check /etc/zypp/systemCheck.d/dotnet-host.check |
| 80 | + |
| 81 | +RUN rm -rf /tmp/* && zypper clean -a && rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}; \ |
| 82 | + rm -rf {/target,}/run/*; \ |
| 83 | + rm -f {/target,}/etc/{shadow-,group-,passwd-,.pwd.lock}; \ |
| 84 | + rm -f {/target,}/usr/lib/sysimage/rpm/.rpm.lock; \ |
| 85 | + rm -f {/target,}/var/cache/ldconfig/aux-cache; \ |
| 86 | + command -v zypper >/dev/null 2>&1 || rm -f /var/lib/zypp/AutoInstalled |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +ENV APP_UID=1654 ASPNETCORE_HTTP_PORTS=8080 DOTNET_RUNNING_IN_CONTAINER=true |
| 91 | +ENV DOTNET_VERSION=10.0.0 |
| 92 | +RUN useradd --uid=$APP_UID -U -d /app -G '' -ms /bin/bash app |
| 93 | +WORKDIR /app |
| 94 | +EXPOSE 8080 |
0 commit comments