-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
27 lines (19 loc) · 686 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine as extruntime
FROM microsoft/dotnet:2.2-sdk-alpine AS build
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY . .
WORKDIR /app/src
RUN dotnet restore --configfile nuget.config
WORKDIR /app
# Copy everything else and build
RUN dotnet publish src/ArchitectNow.ApiStarter.Api/ArchitectNow.ApiStarter.Api.csproj -c Release -o /out
# ARG configuration=test
# COPY deployments/$configuration/Ms.Apis /out
# Build runtime image
FROM extruntime AS appruntime
WORKDIR /app
COPY --from=build /out .
ENV ASPNETCORE_ENVIRONMENT Development
ENV ASPNETCORE_URLS http://+:7401
CMD ["dotnet", "./ArchitectNow.ApiStarter.Api.dll"]