mirror of
https://github.com/fergalmoran/podnoms.git
synced 2026-02-14 03:35:05 +00:00
19 lines
393 B
Docker
Executable File
19 lines
393 B
Docker
Executable File
FROM microsoft/aspnetcore-build:2.0 AS build-env
|
|
WORKDIR /app
|
|
|
|
# Copy csproj and restore as distinct layers
|
|
COPY *.csproj ./
|
|
COPY NuGet.config ./
|
|
RUN dotnet restore
|
|
|
|
# Copy everything else and build
|
|
COPY . ./
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
# Build runtime image
|
|
FROM fergalmoran/aspnetcore-podnoms
|
|
WORKDIR /app
|
|
|
|
COPY --from=build-env /app/out .
|
|
ENTRYPOINT ["dotnet", "PodNoms.Api.dll"]
|