From ea532aa18064f9a0e89acc8d8d3bb8a9b84dba2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 23:52:57 +0000 Subject: [PATCH] Bump dotnet/sdk from 10.0 to 11.0 Bumps dotnet/sdk from 10.0 to 11.0. --- updated-dependencies: - dependency-name: dotnet/sdk dependency-version: '11.0' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Dockerfile | 94 ++++++++++++++++++------------------- Dockerfile.migrate | 114 ++++++++++++++++++++++----------------------- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Dockerfile b/Dockerfile index efae73b..c5f939f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,47 +1,47 @@ -# syntax=docker/dockerfile:1 - -# ----- build ----- -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build -WORKDIR /source - -# restore first so the layer is cached until a project file changes -COPY src/Taskist.sln ./ -COPY src/Libraries/Taskist.Core/Taskist.Core.csproj Libraries/Taskist.Core/ -COPY src/Libraries/Taskist.Data/Taskist.Data.csproj Libraries/Taskist.Data/ -COPY src/Libraries/Taskist.Service/Taskist.Service.csproj Libraries/Taskist.Service/ -COPY src/Presentation/Taskist.Web/Taskist.Web.csproj Presentation/Taskist.Web/ - -# restore the web project, not the solution: the solution also lists the test project, which is not copied here -RUN dotnet restore Presentation/Taskist.Web/Taskist.Web.csproj - -COPY src/ ./ - -RUN dotnet publish Presentation/Taskist.Web/Taskist.Web.csproj \ - -c Release \ - -o /app \ - --no-restore - -# ----- runtime ----- -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime -WORKDIR /app - -# curl backs the container health check -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=build /app ./ - -# data protection keys must outlive the container (attachments live in the database) -RUN mkdir -p /app/App_Data/DataProtectionKeys \ - && chown -R $APP_UID:$APP_UID /app/App_Data - -# run as the non-root user provided by the base image -USER $APP_UID - -ENV ASPNETCORE_ENVIRONMENT=Production \ - ASPNETCORE_HTTP_PORTS=8080 - -EXPOSE 8080 - -ENTRYPOINT ["dotnet", "Taskist.Web.dll"] +# syntax=docker/dockerfile:1 + +# ----- build ----- +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build +WORKDIR /source + +# restore first so the layer is cached until a project file changes +COPY src/Taskist.sln ./ +COPY src/Libraries/Taskist.Core/Taskist.Core.csproj Libraries/Taskist.Core/ +COPY src/Libraries/Taskist.Data/Taskist.Data.csproj Libraries/Taskist.Data/ +COPY src/Libraries/Taskist.Service/Taskist.Service.csproj Libraries/Taskist.Service/ +COPY src/Presentation/Taskist.Web/Taskist.Web.csproj Presentation/Taskist.Web/ + +# restore the web project, not the solution: the solution also lists the test project, which is not copied here +RUN dotnet restore Presentation/Taskist.Web/Taskist.Web.csproj + +COPY src/ ./ + +RUN dotnet publish Presentation/Taskist.Web/Taskist.Web.csproj \ + -c Release \ + -o /app \ + --no-restore + +# ----- runtime ----- +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime +WORKDIR /app + +# curl backs the container health check +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=build /app ./ + +# data protection keys must outlive the container (attachments live in the database) +RUN mkdir -p /app/App_Data/DataProtectionKeys \ + && chown -R $APP_UID:$APP_UID /app/App_Data + +# run as the non-root user provided by the base image +USER $APP_UID + +ENV ASPNETCORE_ENVIRONMENT=Production \ + ASPNETCORE_HTTP_PORTS=8080 + +EXPOSE 8080 + +ENTRYPOINT ["dotnet", "Taskist.Web.dll"] diff --git a/Dockerfile.migrate b/Dockerfile.migrate index 7e4052e..9e9b2ec 100644 --- a/Dockerfile.migrate +++ b/Dockerfile.migrate @@ -1,57 +1,57 @@ -# syntax=docker/dockerfile:1 - -# Applies EF Core migrations and the seed scripts, then exits. -# Run as an init step before the application container starts. - -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build -WORKDIR /source - -RUN dotnet tool install --global dotnet-ef --version 10.* - -ENV PATH="${PATH}:/root/.dotnet/tools" - -COPY src/Taskist.sln ./ -COPY src/Libraries/Taskist.Core/Taskist.Core.csproj Libraries/Taskist.Core/ -COPY src/Libraries/Taskist.Data/Taskist.Data.csproj Libraries/Taskist.Data/ -COPY src/Libraries/Taskist.Service/Taskist.Service.csproj Libraries/Taskist.Service/ -COPY src/Presentation/Taskist.Web/Taskist.Web.csproj Presentation/Taskist.Web/ - -# the bundle is published self-contained, so restore must target that runtime. -# restore the startup project, not the solution: the solution also lists the test project, which is not copied here -RUN dotnet restore Libraries/Taskist.Data/Taskist.Data.csproj -r linux-x64 - -COPY src/ ./ - -# a self-contained bundle avoids needing the SDK at run time; the connection is passed by the entrypoint. -# Taskist.Data is its own startup project (design-time factory; the web project has no EF Design reference). -RUN dotnet ef migrations bundle \ - --project Libraries/Taskist.Data/Taskist.Data.csproj \ - --startup-project Libraries/Taskist.Data/Taskist.Data.csproj \ - --configuration Release \ - --self-contained \ - --runtime linux-x64 \ - --output /migrate/efbundle - -# ----- runtime ----- -FROM mcr.microsoft.com/dotnet/runtime-deps:10.0 AS runtime -WORKDIR /migrate - -# mssql-tools18 provides sqlcmd for the seed scripts; the repository follows the base image's distro -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl gnupg ca-certificates \ - && . /etc/os-release \ - && curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/${ID}/${VERSION_ID}/prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/mssql-release.list \ - && apt-get update \ - && ACCEPT_EULA=Y apt-get install -y --no-install-recommends mssql-tools18 unixodbc \ - && rm -rf /var/lib/apt/lists/* - -ENV PATH="${PATH}:/opt/mssql-tools18/bin" - -COPY --from=build /migrate/efbundle ./efbundle -COPY sql-scripts/ ./seed/ -COPY docker/migrate-entrypoint.sh ./migrate-entrypoint.sh - -RUN chmod +x ./efbundle ./migrate-entrypoint.sh - -ENTRYPOINT ["./migrate-entrypoint.sh"] +# syntax=docker/dockerfile:1 + +# Applies EF Core migrations and the seed scripts, then exits. +# Run as an init step before the application container starts. + +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build +WORKDIR /source + +RUN dotnet tool install --global dotnet-ef --version 10.* + +ENV PATH="${PATH}:/root/.dotnet/tools" + +COPY src/Taskist.sln ./ +COPY src/Libraries/Taskist.Core/Taskist.Core.csproj Libraries/Taskist.Core/ +COPY src/Libraries/Taskist.Data/Taskist.Data.csproj Libraries/Taskist.Data/ +COPY src/Libraries/Taskist.Service/Taskist.Service.csproj Libraries/Taskist.Service/ +COPY src/Presentation/Taskist.Web/Taskist.Web.csproj Presentation/Taskist.Web/ + +# the bundle is published self-contained, so restore must target that runtime. +# restore the startup project, not the solution: the solution also lists the test project, which is not copied here +RUN dotnet restore Libraries/Taskist.Data/Taskist.Data.csproj -r linux-x64 + +COPY src/ ./ + +# a self-contained bundle avoids needing the SDK at run time; the connection is passed by the entrypoint. +# Taskist.Data is its own startup project (design-time factory; the web project has no EF Design reference). +RUN dotnet ef migrations bundle \ + --project Libraries/Taskist.Data/Taskist.Data.csproj \ + --startup-project Libraries/Taskist.Data/Taskist.Data.csproj \ + --configuration Release \ + --self-contained \ + --runtime linux-x64 \ + --output /migrate/efbundle + +# ----- runtime ----- +FROM mcr.microsoft.com/dotnet/runtime-deps:10.0 AS runtime +WORKDIR /migrate + +# mssql-tools18 provides sqlcmd for the seed scripts; the repository follows the base image's distro +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl gnupg ca-certificates \ + && . /etc/os-release \ + && curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/${ID}/${VERSION_ID}/prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/mssql-release.list \ + && apt-get update \ + && ACCEPT_EULA=Y apt-get install -y --no-install-recommends mssql-tools18 unixodbc \ + && rm -rf /var/lib/apt/lists/* + +ENV PATH="${PATH}:/opt/mssql-tools18/bin" + +COPY --from=build /migrate/efbundle ./efbundle +COPY sql-scripts/ ./seed/ +COPY docker/migrate-entrypoint.sh ./migrate-entrypoint.sh + +RUN chmod +x ./efbundle ./migrate-entrypoint.sh + +ENTRYPOINT ["./migrate-entrypoint.sh"]