test: scaffold isolated grpc data docker fixtures

This commit is contained in:
Joseph Doherty
2026-11-16 04:31:00 -05:00
parent 862dbc8e90
commit daea02b271
7 changed files with 747 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Standalone P10 host image. The run coordinator supplies SOURCE_REVISION from
# the current checkout and uses a run-scoped image name in compose.yml.
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet restore ZB.MOM.WW.OtOpcUa.slnx
ARG SOURCE_REVISION
RUN test -n "$SOURCE_REVISION" && dotnet publish \
src/Server/ZB.MOM.WW.OtOpcUa.Host/ZB.MOM.WW.OtOpcUa.Host.csproj \
-c Release -o /app --no-restore -p:SourceRevisionId="$SOURCE_REVISION"
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
COPY --from=build /app ./
EXPOSE 9000 4053 4055 4056 4057 4840 9001
ENTRYPOINT ["dotnet", "OtOpcUa.Host.dll"]
FROM build AS migrator
RUN dotnet tool install --global dotnet-ef --version 10.0.7
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
ENTRYPOINT ["dotnet", "ef", "database", "update", \
"--project", "src/Core/ZB.MOM.WW.OtOpcUa.Configuration", \
"--startup-project", "src/Core/ZB.MOM.WW.OtOpcUa.Configuration"]