-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-iiifbuilder
37 lines (28 loc) · 1.72 KB
/
Dockerfile-iiifbuilder
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
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
WORKDIR /src
COPY src/Wellcome.Dds/Wellcome.Dds.Server/Wellcome.Dds.Server.csproj Wellcome.Dds.Server/
COPY src/Wellcome.Dds/Wellcome.Dds.Common/Wellcome.Dds.Common.csproj Wellcome.Dds.Common/
COPY src/Wellcome.Dds/Utils/Utils.csproj Utils/
COPY src/Wellcome.Dds/Utils.Aws/Utils.Aws.csproj Utils.Aws/
COPY src/Wellcome.Dds/Wellcome.Dds.AssetDomainRepositories/Wellcome.Dds.AssetDomainRepositories.csproj Wellcome.Dds.AssetDomainRepositories/
COPY src/Wellcome.Dds/Wellcome.Dds.AssetDomain/Wellcome.Dds.AssetDomain.csproj Wellcome.Dds.AssetDomain/
COPY src/Wellcome.Dds/Utils.Tests/Utils.Tests.csproj Utils.Tests/
COPY src/Wellcome.Dds/Wellcome.Dds.AssetDomainRepositories.Tests/Wellcome.Dds.AssetDomainRepositories.Tests.csproj Wellcome.Dds.AssetDomainRepositories.Tests/
COPY src/Wellcome.Dds/Wellcome.Dds.Server.Tests/Wellcome.Dds.Server.Tests.csproj Wellcome.Dds.Server.Tests/
COPY src/Wellcome.Dds/Wellcome.Dds.Common.Tests/Wellcome.Dds.Common.Tests.csproj Wellcome.Dds.Common.Tests/
RUN dotnet restore "Wellcome.Dds.Server/Wellcome.Dds.Server.csproj"
# Copy everything else
COPY src/Wellcome.Dds/ ./
WORKDIR "/src/Wellcome.Dds.Server"
RUN dotnet build "Wellcome.Dds.Server.csproj" -c Release
FROM build AS publish
WORKDIR "/src/Wellcome.Dds.Server"
RUN dotnet publish "Wellcome.Dds.Server.csproj" -c Release -o /app/publish
# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
LABEL maintainer="Donald Gray <[email protected]>,Tom Crane <[email protected]>"
LABEL org.opencontainers.image.source=https://github.com/wellcomecollection/iiif-builder
WORKDIR /app
EXPOSE 80
COPY --from=publish /app/publish .
ENTRYPOINT [ "dotnet", "Wellcome.Dds.Server.dll" ]