diff --git a/.run/Gremlin_BlazorServer_Dockerfile.run.xml b/.run/Gremlin_BlazorServer_Dockerfile.run.xml new file mode 100644 index 0000000..d4faa5d --- /dev/null +++ b/.run/Gremlin_BlazorServer_Dockerfile.run.xml @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Gremlin_BlazorServer/Dockerfile b/Gremlin_BlazorServer/Dockerfile index 0b35561..6406a89 100644 --- a/Gremlin_BlazorServer/Dockerfile +++ b/Gremlin_BlazorServer/Dockerfile @@ -1,11 +1,11 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base +FROM mcr.microsoft.com/dotnet/nightly/aspnet:8.0-preview AS base WORKDIR /app -EXPOSE 80 -EXPOSE 443 +EXPOSE 5000 -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0-preview AS build +FROM mcr.microsoft.com/dotnet/nightly/runtime:8.0-preview AS run WORKDIR /src COPY ["Gremlin_BlazorServer/Gremlin_BlazorServer.csproj", "Gremlin_BlazorServer/"] RUN dotnet restore "Gremlin_BlazorServer/Gremlin_BlazorServer.csproj" @@ -13,10 +13,14 @@ COPY . . WORKDIR "/src/Gremlin_BlazorServer" RUN dotnet build "Gremlin_BlazorServer.csproj" -c Release -o /app/build +FROM run AS run +RUN dotnet dev-certs https +RUN dotnet dev-certs https --trust + FROM build AS publish RUN dotnet publish "Gremlin_BlazorServer.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "Gremlin_BlazorServer.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "Gremlin_BlazorServer.dll"] diff --git a/Gremlin_BlazorServer/docker-compose.yml b/Gremlin_BlazorServer/docker-compose.yml new file mode 100644 index 0000000..729e446 --- /dev/null +++ b/Gremlin_BlazorServer/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.3" +services: + web: + container_name: gremlin_docker + build: + context: .. + dockerfile: /home/sascha/current_coding/Gremlin/Gremlin_BlazorServer/Dockerfile \ No newline at end of file