Enable docker file

This commit is contained in:
Michal 2024-08-18 02:37:06 +01:00
parent 4dc448c6a8
commit a002f2ee66
11 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,25 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

18
EdenicExporter/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["EdenicExporter/DotNet.Docker.csproj", "EdenicExporter/"]
RUN dotnet restore "DotNet.Docker.csproj"
COPY . .
WORKDIR "/src/"
RUN dotnet build "DotNet.Docker.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DotNet.Docker.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "EdenicExporter.dll"]

View File

@ -7,6 +7,7 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AssemblyName>EdenicExporter</AssemblyName> <AssemblyName>EdenicExporter</AssemblyName>
<RootNamespace>EdenicExporter</RootNamespace> <RootNamespace>EdenicExporter</RootNamespace>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("EdenicExporter")] [assembly: System.Reflection.AssemblyCompanyAttribute("EdenicExporter")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+629b31ba839c85e3a90158ad79ac7c5a5c3d7334")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4dc448c6a85f4b8e1ae9aac3628f913f81e0facd")]
[assembly: System.Reflection.AssemblyProductAttribute("EdenicExporter")] [assembly: System.Reflection.AssemblyProductAttribute("EdenicExporter")]
[assembly: System.Reflection.AssemblyTitleAttribute("EdenicExporter")] [assembly: System.Reflection.AssemblyTitleAttribute("EdenicExporter")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
dc2545228af00b45c12efa3d9d4cdc6aa4d189b5fe6d0f026df2d080f789f0b7 5c228d10401db4dd1d4ad269b584bd4d088ae38a1d6136da40dbf6cf8be68416