-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.Base64UrlCore
40 lines (31 loc) · 968 Bytes
/
Dockerfile.Base64UrlCore
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
31
32
33
34
35
36
37
38
39
40
FROM microsoft/dotnet:2.2-sdk-bionic AS build
WORKDIR /app
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
ENV NUGET_XMLDOC_MODE=skip
# restore
WORKDIR /app/src/Base64UrlCore/
COPY src/Base64UrlCore/Base64UrlCore.csproj ./
RUN dotnet restore
WORKDIR /app/tests/Base64UrlCore.Tests/
COPY tests/Base64UrlCore.Tests/Base64UrlCore.Tests.csproj ./
RUN dotnet restore
# COPY
WORKDIR /app/
COPY . .
# Build
WORKDIR /app/src/Base64UrlCore/
RUN dotnet build -c Release
# RUN ls ~/.nuget
# RUN ls ~/.nuget/NuGet
# RUN ls ~/.nuget/packages
# RUN cat ~/.nuget/NuGet/NuGet.Config
# Test
WORKDIR /app/tests/Base64UrlCore.Tests/
RUN dotnet tool install -g dotnet-reportgenerator-globaltool
RUN dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[Base64UrlCore.*]*
# publish
WORKDIR /app/src/Base64UrlCore/
RUN dotnet publish -c Release
# pack
VOLUME /app/Base64UrlCore/pack
CMD ["dotnet", "pack", "--include-symbols", "-c", "Release", "-o", "pack"]