-
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
58e87e2
commit 7eeb14f
Showing
5 changed files
with
53 additions
and
68 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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /build | ||
|
||
COPY src/NuGet-CI.Config ./NuGet.Config | ||
COPY src/*/*.csproj ./ | ||
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done | ||
|
||
# This is only needed because swagger uses .NET 7 | ||
ENV DOTNET_ROLL_FORWARD=LatestMajor | ||
|
||
ARG projectFile | ||
RUN test -n "$projectFile" | ||
RUN --mount=type=secret,id=GITHUB_TOKEN \ | ||
GITHUB_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" \ | ||
dotnet restore --packages $HOME/app/.nuget "$projectFile" | ||
|
||
COPY ./src ./ | ||
|
||
RUN dotnet publish "$projectFile" -c Release -o /app/publish --no-restore --source $HOME/app/.nuget | ||
|
||
FROM base AS final | ||
|
||
WORKDIR /app | ||
COPY --from=build /app/publish . | ||
|
||
# 64198 | ||
USER $APP_UID | ||
ENTRYPOINT ["dotnet", "Cheetah.WebApi.dll"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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