-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (24 loc) · 929 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
31
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.sln .
COPY VRAtlas/*.csproj ./VRAtlas/
COPY VRAtlas.Core/*.csproj ./VRAtlas.Core/
COPY VRAtlas.Tests.Unit/*.csproj ./VRAtlas.Tests.Unit/
COPY VRAtlas.Tests.Integration/*.csproj ./VRAtlas.Tests.Integration/
RUN dotnet restore
# copy everything else and build app
COPY VRAtlas/. ./VRAtlas/
COPY VRAtlas.Core/. ./VRAtlas.Core/
COPY VRAtlas.Tests.Unit/. ./VRAtlas.Tests.Unit/
COPY VRAtlas.Tests.Integration/. ./VRAtlas.Tests.Integration/
WORKDIR /app/VRAtlas
RUN dotnet publish -c Release -o out
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
# install ffmpeg
RUN apt-get -y update && apt-get -y upgrade && apt-get install -y --no-install-recommends ffmpeg libgdiplus
WORKDIR /app
COPY --from=build /app/VRAtlas/out ./
ENTRYPOINT ["dotnet", "VRAtlas.dll"]