Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton committed Jun 24, 2024
1 parent 9c4b49f commit 32de1cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Api/Company.Api/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ WORKDIR /App

# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out

# Build runtime image
WORKDIR "/src/Api/Company.Api"
RUN dotnet restore "Company.Api.csproj"
RUN dotnet publish "Company.Api.csproj" -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:8.0

WORKDIR /App
COPY --from=build-env /App/out .

Expand Down

0 comments on commit 32de1cc

Please sign in to comment.