Fix Dockerfile

This commit is contained in:
Aminekan
2026-04-03 13:31:21 +02:00
parent 7434fc2e38
commit e6db37f02b
10 changed files with 20 additions and 32 deletions

View File

@@ -1,29 +1,17 @@
# Unter https://aka.ms/customizecontainer erfahren Sie, wie Sie Ihren Debugcontainer anpassen und wie Visual Studio dieses Dockerfile verwendet, um Ihre Images für ein schnelleres Debuggen zu erstellen.
# Diese Stufe wird verwendet, wenn sie von VS im Schnellmodus ausgeführt wird (Standardeinstellung für Debugkonfiguration).
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER $APP_UID
WORKDIR /app WORKDIR /app
EXPOSE 8080 EXPOSE 8080
EXPOSE 8081
# Diese Stufe wird zum Erstellen des Dienstprojekts verwendet.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src WORKDIR /src
COPY ["ShopAPI/ShopAPI.csproj", "ShopAPI/"] COPY ["ShopAPI.csproj", "./"]
RUN dotnet restore "./ShopAPI/ShopAPI.csproj" RUN dotnet restore "ShopAPI.csproj"
COPY . . COPY . .
WORKDIR "/src/ShopAPI" RUN dotnet build "ShopAPI.csproj" -c Release -o /app/build
RUN dotnet build "./ShopAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Diese Stufe wird verwendet, um das Dienstprojekt zu veröffentlichen, das in die letzte Phase kopiert werden soll.
FROM build AS publish FROM build AS publish
ARG BUILD_CONFIGURATION=Release RUN dotnet publish "ShopAPI.csproj" -c Release -o /app/publish
RUN dotnet publish "./ShopAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# Diese Stufe wird in der Produktion oder bei Ausführung von VS im regulären Modus verwendet (Standard, wenn die Debugkonfiguration nicht verwendet wird).
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .

View File

@@ -15,7 +15,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ShopAPI")] [assembly: System.Reflection.AssemblyCompanyAttribute("ShopAPI")]
[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+d297055cc4ab7e3c8a93d2b98beca4da08aba908")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7434fc2e383eab0a851edefb00efa6792b449418")]
[assembly: System.Reflection.AssemblyProductAttribute("ShopAPI")] [assembly: System.Reflection.AssemblyProductAttribute("ShopAPI")]
[assembly: System.Reflection.AssemblyTitleAttribute("ShopAPI")] [assembly: System.Reflection.AssemblyTitleAttribute("ShopAPI")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
4ace5e3dd2679b7f8d6ba402a9a151576ba9bd2f4940c60938bf7c3a5fa4b2f7 ed962257c8cc549335443a520fc7651fc3b07a868cd516b095cbeda60aad08d8

View File

@@ -17,13 +17,13 @@ build_property._SupportedPlatformList = Linux,macOS,Windows
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ShopAPI build_property.RootNamespace = ShopAPI
build_property.RootNamespace = ShopAPI build_property.RootNamespace = ShopAPI
build_property.ProjectDir = C:\Users\bib\Desktop\Projekt-Fluxon\shop_Fluxon\ShopAPI\ShopAPI\ build_property.ProjectDir = C:\Users\bib\Desktop\WebShop_Fluxon\ShopAPI\ShopAPI\
build_property.EnableComHosting = build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.RazorLangVersion = 8.0 build_property.RazorLangVersion = 8.0
build_property.SupportLocalizedComponentNames = build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes = build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = C:\Users\bib\Desktop\Projekt-Fluxon\shop_Fluxon\ShopAPI\ShopAPI build_property.MSBuildProjectDirectory = C:\Users\bib\Desktop\WebShop_Fluxon\ShopAPI\ShopAPI
build_property._RazorSourceGeneratorDebug = build_property._RazorSourceGeneratorDebug =
build_property.EffectiveAnalysisLevelStyle = 8.0 build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity = build_property.EnableCodeStyleSeverity =

View File

@@ -1 +1 @@
{"GlobalPropertiesHash":"l3up3a1JVDyRbZK9+Chmv7A0oS74DHlr0HHn8mgORkk=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["qXK9XBukmOKR4bC0/OSWUQmD7NVDnODrTNbVfODoSOA=","RsfaIcSdxUsyxkHT0X7TBDvWAE\u002BekQ7N\u002BCKYPxhpGog="],"CachedAssets":{},"CachedCopyCandidates":{}} {"GlobalPropertiesHash":"aHItrtgkqM/5UOeUxqtlHnGvBfdRsqL+YefDHUpNSOc=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["Rr08cHADUrCD\u002B1jxwTmhdLzxj74VTEvpTj1sqh4cqBw=","iD1lRa879XngZNxMMrgsfEujRcVo1E8mkkO2rqgiSgw="],"CachedAssets":{},"CachedCopyCandidates":{}}

View File

@@ -1,17 +1,17 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj": {} "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj": {}
}, },
"projects": { "projects": {
"C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj": { "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj", "projectUniqueName": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj",
"projectName": "ShopAPI", "projectName": "ShopAPI",
"projectPath": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj", "projectPath": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj",
"packagesPath": "C:\\Users\\bib\\.nuget\\packages\\", "packagesPath": "C:\\Users\\bib\\.nuget\\packages\\",
"outputPath": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\obj\\", "outputPath": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"

View File

@@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\bib\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\bib\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.2</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\bib\.nuget\packages\" /> <SourceRoot Include="C:\Users\bib\.nuget\packages\" />

View File

@@ -3844,11 +3844,11 @@
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj", "projectUniqueName": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj",
"projectName": "ShopAPI", "projectName": "ShopAPI",
"projectPath": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj", "projectPath": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj",
"packagesPath": "C:\\Users\\bib\\.nuget\\packages\\", "packagesPath": "C:\\Users\\bib\\.nuget\\packages\\",
"outputPath": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\obj\\", "outputPath": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"

View File

@@ -1,8 +1,8 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "XoiN4+B0is4=", "dgSpecHash": "nJsFU3hH5rE=",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\bib\\Desktop\\Projekt-Fluxon\\shop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj", "projectFilePath": "C:\\Users\\bib\\Desktop\\WebShop_Fluxon\\ShopAPI\\ShopAPI\\ShopAPI.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\bib\\.nuget\\packages\\bcrypt.net-next\\4.1.0\\bcrypt.net-next.4.1.0.nupkg.sha512", "C:\\Users\\bib\\.nuget\\packages\\bcrypt.net-next\\4.1.0\\bcrypt.net-next.4.1.0.nupkg.sha512",
"C:\\Users\\bib\\.nuget\\packages\\humanizer.core\\2.14.1\\humanizer.core.2.14.1.nupkg.sha512", "C:\\Users\\bib\\.nuget\\packages\\humanizer.core\\2.14.1\\humanizer.core.2.14.1.nupkg.sha512",