diff --git a/TemplateService/Dockerfile b/TemplateService/Dockerfile index b5311bb..808a4a4 100644 --- a/TemplateService/Dockerfile +++ b/TemplateService/Dockerfile @@ -10,17 +10,26 @@ COPY ./ ./ ARG NUGET_API_KEY ARG SOLUTION_NAME -RUN dotnet nuget add source https://nuget.pkg.github.com/trumpee/index.json --name github --username trumpee --password $NUGET_API_KEY --store-password-in-clear-text -RUN ls -alF && dotnet restore "$SOLUTION_NAME.sln" --source "https://api.nuget.org/v3/index.json" --source "https://nuget.pkg.github.com/trumpee/index.json" +RUN dotnet nuget add source https://nuget.pkg.github.com/trumpee/index.json \ + --name github \ + --username trumpee \ + --password $NUGET_API_KEY \ + --store-password-in-clear-text + +RUN dotnet restore "$SOLUTION_NAME.sln" \ + --source "https://api.nuget.org/v3/index.json" \ + --source "https://nuget.pkg.github.com/trumpee/index.json" + RUN dotnet build "$SOLUTION_NAME.sln" -c Release -o /app/build --no-restore FROM build AS publish RUN dotnet publish "$SOLUTION_NAME.sln" -c Release -o /app/publish FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . ARG SOLUTION_NAME +ENV SOLUTION_NAME=$SOLUTION_NAME -WORKDIR /app -COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "$SOLUTION_NAME.dll"]