-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70da21b
commit b9f381c
Showing
2 changed files
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*.user | ||
*.userosscache | ||
*.sln.docstates | ||
.idea | ||
data/map_data.mbtiles | ||
tools | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base | ||
# prepare hosting image | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS hosting | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
FROM base AS basetools | ||
# 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:6.0 AS build | ||
WORKDIR /src | ||
COPY ["src/tile-server.csproj", "./"] | ||
RUN dotnet restore "tile-server.csproj" | ||
COPY ./src . | ||
WORKDIR "/src/" | ||
RUN dotnet build "tile-server.csproj" -c Release -o /app/build | ||
COPY src/. . | ||
RUN dotnet publish -c release -o /app/publish | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "tile-server.csproj" -c Release -o /app/publish | ||
|
||
FROM basetools AS final | ||
# final stage/image | ||
FROM hosting-tools AS server | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
COPY --from=build /app/publish . | ||
ENTRYPOINT ["dotnet", "tile-server.dll"] |