From a36bd994a8eb61d0a2b10833ee26a1343c0d2bf8 Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Fri, 5 Jun 2026 15:49:24 -0500 Subject: [PATCH 1/2] RE1-T121 Dockerfile fix --- Web/Resgrid.Web.Eventing/Dockerfile | 6 ++++-- Web/Resgrid.Web.Mcp/Dockerfile | 6 ++++-- Web/Resgrid.Web.Services/Dockerfile | 6 ++++-- Web/Resgrid.Web/Dockerfile | 6 ++++-- Workers/Resgrid.Workers.Console/Dockerfile | 6 ++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Web/Resgrid.Web.Eventing/Dockerfile b/Web/Resgrid.Web.Eventing/Dockerfile index 15bec7781..7d639b255 100644 --- a/Web/Resgrid.Web.Eventing/Dockerfile +++ b/Web/Resgrid.Web.Eventing/Dockerfile @@ -26,11 +26,13 @@ WORKDIR "/src/Web/Resgrid.Web.Eventing" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Eventing.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND. +# These hardened (distroless) images have no shell, so we can't chain with "sh -c". +ENV WAIT_COMMAND="dotnet Resgrid.Web.Eventing.dll" ENTRYPOINT ["./wait"] -CMD ["dotnet", "Resgrid.Web.Eventing.dll"] diff --git a/Web/Resgrid.Web.Mcp/Dockerfile b/Web/Resgrid.Web.Mcp/Dockerfile index 74f64d1b6..ad2f10d9a 100644 --- a/Web/Resgrid.Web.Mcp/Dockerfile +++ b/Web/Resgrid.Web.Mcp/Dockerfile @@ -37,11 +37,13 @@ WORKDIR "/src/Web/Resgrid.Web.Mcp" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Mcp.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND. +# These hardened (distroless) images have no shell, so we can't chain with "sh -c". +ENV WAIT_COMMAND="dotnet Resgrid.Web.Mcp.dll" ENTRYPOINT ["./wait"] -CMD ["dotnet", "Resgrid.Web.Mcp.dll"] diff --git a/Web/Resgrid.Web.Services/Dockerfile b/Web/Resgrid.Web.Services/Dockerfile index ea420f22a..e22429210 100644 --- a/Web/Resgrid.Web.Services/Dockerfile +++ b/Web/Resgrid.Web.Services/Dockerfile @@ -37,11 +37,13 @@ WORKDIR "/src/Web/Resgrid.Web.Services" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Services.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND. +# These hardened (distroless) images have no shell, so we can't chain with "sh -c". +ENV WAIT_COMMAND="dotnet Resgrid.Web.Services.dll" ENTRYPOINT ["./wait"] -CMD ["dotnet", "Resgrid.Web.Services.dll"] diff --git a/Web/Resgrid.Web/Dockerfile b/Web/Resgrid.Web/Dockerfile index aaa01e4a4..417817bae 100644 --- a/Web/Resgrid.Web/Dockerfile +++ b/Web/Resgrid.Web/Dockerfile @@ -55,11 +55,13 @@ RUN for i in 1 2 3; do libman restore && break || { echo "libman restore attempt ENV SKIP_LIBMAN_RESTORE=1 RUN dotnet publish "Resgrid.Web.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} ## Download the wait script in the build stage where a shell is available -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND. +# These hardened (distroless) images have no shell, so we can't chain with "sh -c". +ENV WAIT_COMMAND="dotnet Resgrid.Web.dll" ENTRYPOINT ["./wait"] -CMD ["dotnet", "Resgrid.Web.dll"] diff --git a/Workers/Resgrid.Workers.Console/Dockerfile b/Workers/Resgrid.Workers.Console/Dockerfile index 196c0e0a1..a12b8cd21 100644 --- a/Workers/Resgrid.Workers.Console/Dockerfile +++ b/Workers/Resgrid.Workers.Console/Dockerfile @@ -37,7 +37,7 @@ WORKDIR "/src/Workers/Resgrid.Workers.Console" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Workers.Console.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /app/publish/wait +ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait ## Install wkhtmltopdf and capture its runtime libraries @@ -76,5 +76,7 @@ ENV LD_LIBRARY_PATH="/usr/local/lib/wkhtmltopdf" COPY --from=publish /app/publish . +# docker-compose-wait waits for WAIT_HOSTS, then execs WAIT_COMMAND. +# These hardened (distroless) images have no shell, so we can't chain with "sh -c". +ENV WAIT_COMMAND="dotnet Resgrid.Workers.Console.dll" ENTRYPOINT ["./wait"] -CMD ["dotnet", "Resgrid.Workers.Console.dll"] From 749bbc6eda8cdb70a49dacfab16a6c8e7ef56fb8 Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Fri, 5 Jun 2026 15:58:40 -0500 Subject: [PATCH 2/2] RE1-T121 PR#397 fixes --- Web/Resgrid.Web.Eventing/Dockerfile | 3 ++- Web/Resgrid.Web.Mcp/Dockerfile | 3 ++- Web/Resgrid.Web.Services/Dockerfile | 3 ++- Web/Resgrid.Web/Dockerfile | 3 ++- Workers/Resgrid.Workers.Console/Dockerfile | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Web/Resgrid.Web.Eventing/Dockerfile b/Web/Resgrid.Web.Eventing/Dockerfile index 7d639b255..5fc4b4eae 100644 --- a/Web/Resgrid.Web.Eventing/Dockerfile +++ b/Web/Resgrid.Web.Eventing/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.7 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. ARG BUILD_VERSION=3.5.0 @@ -26,7 +27,7 @@ WORKDIR "/src/Web/Resgrid.Web.Eventing" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Eventing.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait +ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final diff --git a/Web/Resgrid.Web.Mcp/Dockerfile b/Web/Resgrid.Web.Mcp/Dockerfile index ad2f10d9a..19d83a50d 100644 --- a/Web/Resgrid.Web.Mcp/Dockerfile +++ b/Web/Resgrid.Web.Mcp/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.7 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. ARG BUILD_VERSION=3.5.0 @@ -37,7 +38,7 @@ WORKDIR "/src/Web/Resgrid.Web.Mcp" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Mcp.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait +ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final diff --git a/Web/Resgrid.Web.Services/Dockerfile b/Web/Resgrid.Web.Services/Dockerfile index e22429210..58de9e417 100644 --- a/Web/Resgrid.Web.Services/Dockerfile +++ b/Web/Resgrid.Web.Services/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.7 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. ARG BUILD_VERSION=3.5.0 @@ -37,7 +38,7 @@ WORKDIR "/src/Web/Resgrid.Web.Services" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Web.Services.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait +ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final diff --git a/Web/Resgrid.Web/Dockerfile b/Web/Resgrid.Web/Dockerfile index 417817bae..4716226b5 100644 --- a/Web/Resgrid.Web/Dockerfile +++ b/Web/Resgrid.Web/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.7 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. ARG BUILD_VERSION=3.5.0 @@ -55,7 +56,7 @@ RUN for i in 1 2 3; do libman restore && break || { echo "libman restore attempt ENV SKIP_LIBMAN_RESTORE=1 RUN dotnet publish "Resgrid.Web.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} ## Download the wait script in the build stage where a shell is available -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait +ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait FROM base AS final diff --git a/Workers/Resgrid.Workers.Console/Dockerfile b/Workers/Resgrid.Workers.Console/Dockerfile index a12b8cd21..433f0ad2f 100644 --- a/Workers/Resgrid.Workers.Console/Dockerfile +++ b/Workers/Resgrid.Workers.Console/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.7 #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. ARG BUILD_VERSION=3.5.0 @@ -37,7 +38,7 @@ WORKDIR "/src/Workers/Resgrid.Workers.Console" FROM build AS publish ARG BUILD_VERSION RUN dotnet publish "Resgrid.Workers.Console.csproj" -c Release -o /app/publish -p:Version=${BUILD_VERSION} -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait +ADD --checksum=sha256:2241be671073520e028b2f12df1e9ef0419014cffb5670b7a80b2080804be17d https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait /app/publish/wait RUN chmod +x /app/publish/wait ## Install wkhtmltopdf and capture its runtime libraries