dockerfile update

master
Tudor Stanciu 2023-03-27 03:27:34 +03:00
parent 895120562d
commit ce9f5c5728
1 changed files with 10 additions and 11 deletions

View File

@ -1,23 +1,22 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
WORKDIR /src WORKDIR /buildspace
COPY ["dependencies.props", "."] COPY ["dependencies.props", "."]
COPY ["Directory.Build.props", "."] COPY ["Directory.Build.props", "."]
COPY ["NuGet.config", "."] COPY ["NuGet.config", "."]
COPY ["ReleaseNotes.xml", "."] COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "src/api/NetworkResurrector.Api/"]
COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"] COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "src/api/NetworkResurrector.Api.Application/"]
COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"] COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "src/api/NetworkResurrector.Api.Domain/"]
COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "NetworkResurrector.Api.PublishedLanguage/"] COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "src/api/NetworkResurrector.Api.PublishedLanguage/"]
COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"] COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "src/api/NetworkResurrector.Api.Domain.Data/"]
COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"] RUN dotnet restore "src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj"
RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj" COPY --exclude=src/agent --exclude=src/server . .
COPY src/api . WORKDIR "/buildspace/src/api/NetworkResurrector.Api"
WORKDIR "/src/NetworkResurrector.Api"
RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish