-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile
30 lines (21 loc) · 828 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
28
29
30
ARG ASPNET_VERSION="6.0.0-alpine3.14"
ARG SDK_VERSION="6.0.100-alpine3.14"
ARG BASE_ADRESS="mcr.microsoft.com/dotnet"
FROM $BASE_ADRESS/aspnet:$ASPNET_VERSION AS base
WORKDIR /app
EXPOSE 7000
FROM $BASE_ADRESS/sdk:$SDK_VERSION AS build
WORKDIR /src
COPY ./src/Dotnet6.GraphQL4.Store.WebMVC/*.csproj ./Dotnet6.GraphQL4.Store.WebMVC/
COPY ./NuGet.Config ./
COPY ./Directory.Build.props ./
RUN dotnet restore ./Dotnet6.GraphQL4.Store.WebMVC
COPY ./src/Dotnet6.GraphQL4.Store.WebMVC/. ./Dotnet6.GraphQL4.Store.WebMVC/
WORKDIR /src/Dotnet6.GraphQL4.Store.WebMVC
RUN dotnet build -c Release --no-restore -o /app/build
FROM build AS publish
RUN dotnet publish -c Release --no-restore -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Dotnet6.GraphQL4.Store.WebMVC.dll"]