To generate a Docker image by using an internal NuGet package that is reachable through an internal network path, follow these steps:
FROM microsoft/dotnet:2.2-sdk
WORKDIR /app
COPY . .
RUN dotnet tool install --global NuGet.CommandLine
ENV PATH="${PATH}:/root/.dotnet/tools"
nuget
CLI to restore your packages from your internal NuGet feed. For example:RUN nuget sources add -name MyNuGetFeed -source \\server\path\to\feed
RUN nuget restore MyProject.csproj -Source MyNuGetFeed
Continue building your Docker image by adding any additional steps necessary to configure your application and its dependencies.
Build your Docker image using the docker build
command. Make sure you are running the command in a context that has access to your internal network path.
docker build -t my-image .
docker push
command. docker push my-registry/my-image
Overall, the key steps for generating a Docker image using an internal NuGet package that is reachable through an internal network path are to configure your NuGet client, restore your packages from your internal feed, and then continue building your Docker image as usual.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-08-25 11:00:00 +0000
Seen: 10 times
Last updated: Nov 15 '22
Why isn't the CSS background image being displayed?
What is the method for aligning an image at the center using NPOI in c#?
How can I use iText7 to create a PDF that includes a pie chart?
What is causing my Flutter Android apk's image to appear as a single 1x1 pixel?
When image delivery is slow, how does it affect the inference time with GPU?
What is meant by "Kubernetes error invalid capacity 0 on image filesystem"?