I am trying to configure the CI pipeline for the dotnet library using docker and dotnet cli.
I run the docker build statement - create this dockerfile
FROM microsoft/dotnet
COPY . ~/dotnetapp
WORKDIR ~/dotnetapp
ARG NUGET_SOURCE
ARG NUGET_API
ARG BUILD_VERSION
RUN dotnet restore ./lib1/lib1.csproj
RUN dotnet pack ./lib1/lib1.csproj -o ./packaged -c Release /p:Version=0.0.${BUILD_VERSION}
RUN dotnet nuget push ./lib1/packaged/*.nupkg -k ${NUGET_API} -s ${NUGET_SOURCE}
The Restore and Pack commands run as expected, but the failure on the nuget server fails.
info : An error occurred while sending the request.
info : Server returned nothing (no headers, no data)
info : PUT https://www.myget.org/x/xxxxxxxxx/api/v2/package/
info : An error was encountered when fetching 'PUT https://www.myget.org/x/xxxxxxxxx/api/v2/package/'. The request will now be re
tried to.
I have tried several nuget repositories and various image options of basic docker - to no avail.
What magic spells am I missing?
source
share