diff --git a/ShowcaseProject/ShowcaseFrontend/Dockerfile b/ShowcaseProject/ShowcaseFrontend/Dockerfile index 2b1ee16..715f725 100644 --- a/ShowcaseProject/ShowcaseFrontend/Dockerfile +++ b/ShowcaseProject/ShowcaseFrontend/Dockerfile @@ -1,18 +1,15 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev WORKDIR /app - -COPY . . -RUN dotnet restore ./ShowcaseFrontend//ShowcaseFrontend.csproj - COPY ShowcaseFrontend/. ShowcaseFrontend/ WORKDIR /app/ShowcaseFrontend -CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://0.0.0.0:80"] +CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://+:80"] FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src -COPY . . +COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ RUN dotnet restore ./ShowcaseFrontend/ShowcaseFrontend.csproj +COPY ShowcaseFrontend/. ShowcaseFrontend/ WORKDIR /src/ShowcaseFrontend RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false diff --git a/ShowcaseProject/docker-compose.yml b/ShowcaseProject/docker-compose.yml index 8f7429a..c21ef7e 100644 --- a/ShowcaseProject/docker-compose.yml +++ b/ShowcaseProject/docker-compose.yml @@ -16,7 +16,7 @@ services: build: context: . dockerfile: ShowcaseFrontend/Dockerfile - target: "dev" + target: "build" container_name: showcasefrontend ports: - "8080:80"