forked from GoogleCloudPlatform/eventarc-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 915 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
# Use Microsoft's official build .NET image.
# https://hub.docker.com/_/microsoft-dotnet-core-sdk/
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
WORKDIR /app
# Copy local code to the container image.
COPY image-v1/watermarker ./image-v1/watermarker
# Copy common library
COPY common ./common
# Install production dependencies
# Restore as distinct layers
RUN dotnet restore common/csharp
RUN dotnet restore image-v1/watermarker/csharp
# Build a release artifact.
RUN dotnet publish image-v1/watermarker/csharp -c Release -o out
# Use Microsoft's official runtime .NET image.
# https://hub.docker.com/_/microsoft-dotnet-core-aspnet/
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime
WORKDIR /app
COPY --from=build /app/out ./
# Copy the font file
COPY image-v1/watermarker/csharp/Arial.ttf /app/Arial.ttf
# Run the web service on container startup.
ENTRYPOINT ["dotnet", "Watermarker.dll"]