From c9c044365a632f767daba5a9af616764c2c6202e Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Sun, 29 Jan 2023 22:58:30 +0100 Subject: [PATCH] Dockerfile: install Http plugin in separate folder Some people mount a folder on the plugin directory. This is fine, but our sneaky Impostor.Http install method won't work here. So put it in a different folder and prepend our folder to the plugin search path. The number 76 has been randomly picked using dice --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34f9b04..b38405a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,10 +38,14 @@ FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 WORKDIR /app COPY --from=build /app ./ -# 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= +# Add Impostor.Http as a default built-in plugin +ADD https://github.com/Impostor/Impostor.Http/releases/download/v0.4.0/Impostor.Http.dll /app/builtin-plugins/ +# Make it listen to 0.0.0.0 to expose it to the outside world. +ENV IMPOSTOR_HTTP_HttpServer__ListenIp=0.0.0.0 +# Override ASPNETCORE_URLS to stop warning. +ENV ASPNETCORE_URLS= +# Enable the built-in plugin folder. Use a high number to prevent conflicts with existing configurations +ENV IMPOSTOR_PluginLoader__Paths__76=/app/builtin-plugins EXPOSE 22000/tcp 22023/udp ENTRYPOINT ["./Impostor.Server"] -- 2.39.5