diff --git a/Dockerfile b/Dockerfile index a4824b4..c235baf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,17 @@ -FROM mono:latest -MAINTAINER Colin D. Munro - +FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base +WORKDIR /app EXPOSE 12345 -ADD . /src -RUN nuget restore /src/ThirdParty/onvif-discovery/OnvifDiscovery.sln -RUN nuget restore /src/ThirdParty/bmff/BMFF.sln -RUN nuget restore /src/MiniNVR/TestConsole.sln -RUN msbuild /p:Configuration=Release /src/MiniNVR/TestConsole.sln -CMD ["mono", "/src/MiniNVR/TestConsole/bin/Release/TestConsole.exe"] - +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /src +COPY . . +RUN dotnet restore ThirdParty/bmff +RUN dotnet restore ThirdParty/onvif-discovery +RUN dotnet restore ThirdParty/RtspClientSharp +RUN dotnet build MiniNVR/TestConsole -c Release -o /app/build + +FROM base AS final +WORKDIR /app +COPY --from=build /app/build . +LABEL MAINTAINER="Colin D. Munro " +ENTRYPOINT ["dotnet", "TestConsole.dll"] diff --git a/MiniNVR/TestConsole/Properties/AssemblyInfo.cs b/MiniNVR/TestConsole/Properties/AssemblyInfo.cs deleted file mode 100644 index 2917f46..0000000 --- a/MiniNVR/TestConsole/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestConsole")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestConsole")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("61448fac-9854-4b54-a8d3-04108692ef21")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MiniNVR/TestConsole/TestConsole.csproj b/MiniNVR/TestConsole/TestConsole.csproj index 88ebb81..c991249 100644 --- a/MiniNVR/TestConsole/TestConsole.csproj +++ b/MiniNVR/TestConsole/TestConsole.csproj @@ -1,5 +1,4 @@ - - + Debug @@ -8,7 +7,7 @@ Exe TestConsole TestConsole - v4.7.2 + net6.0 512 true true @@ -34,150 +33,6 @@ prompt 4 - - - ..\packages\Microsoft.Data.Sqlite.Core.5.0.2\lib\netstandard2.0\Microsoft.Data.Sqlite.dll - - - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.4\lib\net461\SQLitePCLRaw.batteries_v2.dll - - - ..\packages\SQLitePCLRaw.core.2.0.4\lib\netstandard2.0\SQLitePCLRaw.core.dll - - - ..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.4\lib\net461\SQLitePCLRaw.nativelibrary.dll - - - ..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.4\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll - - - - - - - - - - - - - - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - - ..\packages\Microsoft.Extensions.Logging.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - ..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll - - - ..\packages\Microsoft.Extensions.Options.5.0.0\lib\net461\Microsoft.Extensions.Options.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.5.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - ..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - ..\packages\Microsoft.Extensions.Logging.5.0.0\lib\net461\Microsoft.Extensions.Logging.dll - - - ..\packages\System.Text.Json.5.0.1\lib\net461\System.Text.Json.dll - - - ..\packages\IdentityModel.5.1.0\lib\net472\IdentityModel.dll - - - ..\packages\IdentityModel.OidcClient.4.0.0\lib\netstandard2.0\IdentityModel.OidcClient.dll - - - - - - - - - True - True - Reference.svcmap - - - - - - - - - - - - True - True - Reference.svcmap - - - True - True - Reference.svcmap - - - True - True - Reference.svcmap - - - - - - - - - - - - - - - - - - - - - - @@ -934,12 +789,16 @@ - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/MiniNVR/TestConsole/WebServer.cs b/MiniNVR/TestConsole/WebServer.cs index d0feb4d..d8e6685 100644 --- a/MiniNVR/TestConsole/WebServer.cs +++ b/MiniNVR/TestConsole/WebServer.cs @@ -31,7 +31,9 @@ public interface IEndpoint result.Content = output.ToArray(); } } - result.MimeType = System.Web.MimeMapping.GetMimeMapping(name); + // FIXME: Website doesn't work. + // result.MimeType = System.Web.MimeMapping.GetMimeMapping(name); + result.MimeType = "test/html"; if (result.MimeType.StartsWith("text")) result.MimeType += "; charset=utf-8"; return result;