-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (20 loc) · 713 Bytes
/
Dockerfile
File metadata and controls
25 lines (20 loc) · 713 Bytes
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
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
# Copy csproj
COPY . .
# Copy the certificates
# RUN ls -la
# ADD ca-certificate.crt /usr/local/share/ca-certificates/ca.crt
# RUN chmod 644 /usr/local/share/ca-certificates/ca.crt && update-ca-certificates
# restore as distinct layers
RUN dotnet restore Nozomi.Compute/Nozomi.Compute.csproj
# Copy everything else and build
COPY . ./
RUN dotnet publish Nozomi.Compute/Nozomi.Compute.csproj -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build-env /app/out .
# COPY --from=build-env /app/Nozomi.Compute/ca-certificate.crt .
RUN ls
ENTRYPOINT ["dotnet", "Nozomi.Compute.dll"]