From: miniduikboot Date: Fri, 20 Jan 2023 14:25:22 +0000 (+0100) Subject: Add Impostor.Http to the Docker image (#509) X-Git-Tag: v1.8.1~5 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=5e080b290b8de473e970ab0b750b3a3add648d36;p=rhonda%2Fimpostor.git 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. --- 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"]