40 lines
904 B
Plaintext
40 lines
904 B
Plaintext
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
|
|
WORKDIR /app
|
|
|
|
# API Restore
|
|
WORKDIR /app/OFBButte.Api
|
|
COPY OFBButte.Api/*.csproj ./
|
|
RUN dotnet restore
|
|
|
|
# Application Restore
|
|
WORKDIR /app/OFBButte.Application
|
|
COPY OFBButte.Application/*.csproj ./
|
|
RUN dotnet restore
|
|
|
|
# Database Restore
|
|
WORKDIR /app/OFBButte.Database
|
|
COPY OFBButte.Database/*.csproj ./
|
|
RUN dotnet restore
|
|
|
|
# Entities Restore
|
|
WORKDIR /app/OFBButte.Entities
|
|
COPY OFBButte.Entities/*.csproj ./
|
|
RUN dotnet restore
|
|
|
|
# Infrastructure Restore
|
|
WORKDIR /app/OFBButte.Infrastructure
|
|
COPY OFBButte.Infrastructure/*.csproj ./
|
|
RUN dotnet restore
|
|
|
|
|
|
# Copy everything else and build
|
|
WORKDIR /app
|
|
COPY . ./
|
|
WORKDIR /app/OFBButte.Api
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
# Build runtime image
|
|
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
|
|
WORKDIR /app
|
|
COPY --from=build-env /app/OFBButte.Api/out .
|
|
ENTRYPOINT ["dotnet", "OFBButte.Api.dll", "8112"] |