-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (21 loc) · 719 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (21 loc) · 719 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
# prepare hosting image
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS hosting
WORKDIR /app
EXPOSE 80
EXPOSE 443
# prepare ops tooling
FROM hosting AS hosting-tools
RUN apt update && apt install -y curl && mkdir /tools && \
curl -L https://aka.ms/dotnet-counters/linux-x64 -o /tools/dotnet-counters && \
curl -L https://aka.ms/dotnet-dump/linux-x64 -o /tools/dotnet-dump && \
chmod +x /tools/dotnet-counters /tools/dotnet-dump
# build the application
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY src/. .
RUN dotnet publish -c release -o /app/publish
# final stage/image
FROM hosting-tools AS server
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "tile-server.dll"]