Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMcCarthy committed Jan 2, 2024
1 parent b521657 commit cd40a58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AspNetCore/MyAspNetCoreApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ RUN apt-get install libfreetype6 libfontconfig1 -y


FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR src/MyAspNetCoreApp
COPY . .
# Use a docker secret to add the 'Telerik' package source to the default (usually at ~/.nuget/NuGet/NuGet.Config)
RUN --mount=type=secret,id=telerik_key \
dotnet nuget add source https://nuget.telerik.com/v3/index.json -n "TelerikNuGetServer" -u "api-key" -p $(cat /run/secrets/telerik_key) --store-password-in-clear-text
RUN dotnet restore "MyAspNetCoreApp.csproj"
RUN dotnet build "MyAspNetCoreApp.csproj" -c Release -o /app/build --no-restore
RUN dotnet build "MyAspNetCoreApp.csproj" -c Release -o /app/build


FROM build AS publish
Expand Down

0 comments on commit cd40a58

Please sign in to comment.