Skip to content

Commit

Permalink
Move and change Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
elotoja committed Dec 26, 2023
1 parent 6870bae commit aa0651d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile → src/Quizer.Api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/Quizer.Api/Quizer.Api.csproj", "Quizer.Api/"]
COPY ["src/Quizer.Contracts/Quizer.Contracts.csproj", "Quizer.Contracts/"]
COPY ["src/Quizer.Application/Quizer.Application.csproj", "Quizer.Application/"]
COPY ["src/Quizer.Domain/Quizer.Domain.csproj", "Quizer.Domain/"]
COPY ["src/Quizer.Infrastructure/Quizer.Infrastructure.csproj", "Quizer.Infrastructure/"]
COPY ["Dockerfile", "Quizer.Api/"]
COPY ["Quizer.Api/Quizer.Api.csproj", "Quizer.Api/"]
COPY ["Quizer.Contracts/Quizer.Contracts.csproj", "Quizer.Contracts/"]
COPY ["Quizer.Application/Quizer.Application.csproj", "Quizer.Application/"]
COPY ["Quizer.Domain/Quizer.Domain.csproj", "Quizer.Domain/"]
COPY ["Quizer.Infrastructure/Quizer.Infrastructure.csproj", "Quizer.Infrastructure/"]
RUN dotnet restore "Quizer.Api/Quizer.Api.csproj"
COPY . .
WORKDIR "/src/Quizer.Api"
RUN dotnet build "Quizer.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "./Quizer.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
Expand Down

0 comments on commit aa0651d

Please sign in to comment.