From 5e080b290b8de473e970ab0b750b3a3add648d36 Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Fri, 20 Jan 2023 15:25:22 +0100 Subject: [PATCH] Add Impostor.Http to the Docker image (#509) Adding plugins to the docker image is pretty hard as you need to install ASP.Net Core and add the plugin. As Impostor.Http has become pretty much mandatory, install the plugin by default. --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4739866..080a1ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,8 +34,14 @@ RUN case "$TARGETARCH" in \ dotnet publish -c release -o /app -r "$NETCORE_PLATFORM" -p:VersionSuffix="$VERSIONSUFFIX" --no-restore ./src/Impostor.Server/Impostor.Server.csproj # Final image. -FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime:7.0 +FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 WORKDIR /app COPY --from=build /app ./ -EXPOSE 22023/udp + +# Add Impostor.Http as a default plugin +ADD https://github.com/Impostor/Impostor.Http/releases/download/v0.4.0/Impostor.Http.dll /app/plugins/ +# Make it listen to 0.0.0.0 to expose it to the outside world. Override ASPNETCORE_URLS to stop warning. +ENV IMPOSTOR_HTTP_HttpServer__ListenIp=0.0.0.0 ASPNETCORE_URLS= + +EXPOSE 22000/tcp 22023/udp ENTRYPOINT ["./Impostor.Server"] -- 2.39.5