| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:7121eb4a5ba391efb4ba9a38c532d1c5dc2d22d276f04e062f357eea36ee62c4 in / |
| CMD ["/bin/bash"] |
| ENV APP_UID=1654 ASPNETCORE_HTTP_PORTS=8080 DOTNET_RUNNING_IN_CONTAINER=true |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends ca-certificates libc6 libgcc-s1 libicu74 libssl3t64 libstdc++6 tzdata tzdata-legacy && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c groupadd --gid=$APP_UID app && useradd --no-log-init --uid=$APP_UID --gid=$APP_UID --create-home app # buildkit |
| ENV DOTNET_VERSION=10.0.13 |
| COPY /dotnet /usr/share/dotnet # buildkit |
| RUN /bin/sh -c ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet # buildkit |
| ENV ASPNET_VERSION=10.0.13 |
| COPY /dotnet /usr/share/dotnet # buildkit |
| ENV DOTNET_GENERATE_ASPNET_CERTIFICATE=false DOTNET_NOLOGO=true DOTNET_SDK_VERSION=10.0.402 DOTNET_USE_POLLING_FILE_WATCHER=true NUGET_XMLDOC_MODE=skip POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-24.04 |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl git libatomic1 wget && rm -rf /var/lib/apt/lists/* # buildkit |
| COPY /dotnet /usr/share/dotnet # buildkit |
| COPY /PowerShell.Linux.x64.7.6.7.nupkg / # buildkit |
| RUN /bin/sh -c ln -s /usr/share/dotnet/dnx /usr/bin/dnx && dotnet help # buildkit |
| RUN /bin/sh -c powershell_version=7.6.7 && mkdir --parents /usr/share/powershell && dotnet tool install --add-source / --tool-path /usr/share/powershell --version $powershell_version PowerShell.Linux.x64 && dotnet nuget locals all --clear && rm PowerShell.Linux.x64.$powershell_version.nupkg && ln -s /usr/share/powershell/pwsh /usr/bin/pwsh && chmod 755 /usr/share/powershell/pwsh && chmod 755 /usr/share/powershell/.store/powershell.linux.x64/$powershell_version/powershell.linux.x64/$powershell_version/tools/*/any/pwsh && find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm # buildkit |
| WORKDIR /src/api |
| COPY api/ ./ # buildkit |
| RUN /bin/sh -c dotnet tool install --global dotnet-ef --version 10.0.9 # buildkit |
| ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools |
| RUN /bin/sh -c dotnet restore MayrKur.Api.csproj # buildkit |
| RUN /bin/sh -c dotnet build MayrKur.Api.csproj -c Release --no-restore # buildkit |
| CMD ["dotnet" "ef" "database" "update" "--project" "MayrKur.Api.csproj" "--no-build" "--configuration" "Release"] |