Docker dotnet restore not working

Create Dockerfile in that same directory: FROM microsoft/dotnet:1. 14. NET 8, you can opt into NuGet security auditing for dotnet restore. >> Here is my dockerfile Aug 3, 2022 · @Kit but of course my approach based on your comment won't work with multiple Dockerfiles, as I'll have to build the image first using a separate command. with Visual Studio). eval: line 118: dotnet: not found. it failed like below. TestApi. Workaround: add --verbosity minimal. Jan 19, 2024 · Build . I have a pretty simple dockerfile configured that leverages RUN dontnet restore to retrieve all the necessary nuget packages for my project. 1-sdk-msbuild COPY . The trick here is to config your docker-compose. If you publish a project with -p:PublishReadyToRun=true in addition to --no-restore, the project will only build with packages that were restored in a prior dotnet restore operation. Aug 4, 2022 · I have a problem with dotnet restore command used in docker container behind corporate proxy. RUN dotnet publish -c Release -o out MyAPI/MyAPI. I'm doing it interactively to understand what is going on: docker run -it --rm --volume c:\projects\test-project`:/project microsoft/dotnet:2. app and I try to create a dockerfile. It works! Logically, I sho Jun 16, 2020 · 1. You could either copy everything from root -> root, or mention each project one by one. I got a message in my browser <<This page isn’t working right now localhost didn’t send any data. 1) using visual studio 15. – Dec 27, 2016 · Steps to reproduce the issue With dotnet SDK 1. Presumably showing the prompt is done at wrong logging level and hence do not show up on the console. The case where tests are running only with --no-build flag can be caused by missing Release or Debug configuration for the test. Sep 2, 2021 · I managed to solve this, the issue was being caused by zscaler intercepting the ssl traffic on my machine. But when I build the container from outside from the visual studio it is building fine. When I build my image for arm64 everything works fine. dotnet bin\Debug\<TFM>\<assemblyName>. Dec 19, 2023 · I have a problem with dotnet restore command used in docker container. This workaround allows the restore command to complete successfully but slows down the Feb 18, 2019 · What I have tried is to simply mount my project folder to the docker image and then run dotnet restore. dotnet restore command. It integrates with MSBuild, dotnet, and NuGet(. This works fine in VS2015 on Windows after I add the package source, but when I run: dotnet restore Apr 28, 2021 · I read some documentation on how to setup a docker file for an asp. 16394' was restored using ''. 1 Jan 27, 2021 · Steps to Reproduce. yaml like this: Nov 24, 2019 · I'm playing with docker and . Not sure if it's still a relevant question. Why is this? I thought the dotnet cli could work with non Core projects too? I have nuget packages that are referenced, so I expect the cli to go and download the nuget packages. However image build time will definitely increase so you can consider having dotnet restore as a separate Nov 14, 2017 · you have issues with your working directory try using absolute path instead of relative path in your working directory in docker file Try using dotnet restore Aug 28, 2019 · Expected behavior. So I am forced to write the TargetFramework into the config file: Even worse, there is always a single NuGet restoration in the obj directories, so upon every switch between target frameworks I need to modify the config file and do a fresh restore. cs In Dockerfile restore packages as a first step, and the build with --no-restore as a second step: FROM microsoft/dotnet:2. This is the command that i run in console: docker run --rm name_proj:latest Jan 12, 2022 · dotnet restore in docker build not using all nuget sources (ignoring private github source) Load 7 more related questions Show fewer related questions 0 . sln Mar 6, 2019 · RUN dotnet restore tests/Tests. . dll would be faster still, but you may need to dotnet publish and run the dll from the publish directory rather than the build directory. Where you copy the rest of the files and publish the project should also be changed to. – May 31, 2021 · I noticed this same issue with SDK v5. Below is Dockerfile. 1-aspnetcore-runtime WORKDIR /FrontEnd ENTRYPOINT [ "dotnet", "run" ] EDIT. EDIT 1 Solution consists of: Dec 10, 2018 · Hello i am trying to dockerize a ASP NET Core 2. The buildx build gives other errors that I can’t seem to resolve Sep 27, 2017 · 2. / FROM microsoft/dotnet:2. You then need to set the WORKDIR to the location of the csproj file before running dotnet build OR you could point the RUN dotnet build command on xxxxxx/xxxxx. /NuGet. check your sln file. csproj and add these lines inside the <Project> tag: <ItemGroup>. Thanks Matt. Apr 10, 2022 · Stack Overflow Public questions & answers; Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Talent Build your employer brand Dec 13, 2021 · (2) Your answer does not answer this question - changing to . 247. Run dotnet new console. Provide details and share your research! But avoid …. You could try using a COPY instruction to copy xxx. we can restore the project refs using the dotnet restore command localy). 0 on Ubuntu 14. with the dotnet restore after it isn't going to give you the effect you want. Tool. json’. I also tried mounting the Nugetpackages path to the devcontainer, restore locally and then start the project (since this is my fix to get the restore working properly on my linux maschine). Actual behavior. Also make sure to use IP address of proxy server instead of DNS name in both HTTPS_PROXY and HTTP_PROXY. dotnet --version. The code never existed at tests/ and was never compiled and couldn't be found/executed by dotnet test. Asking for help, clarification, or responding to other answers. Jan 27, 2020 · So if you have multiple projects that have common class libraries, you could easily reference them in your individual docker file. after that , append the config file location in dotnet restore command like this : RUN dotnet restore <CS_project_name>. IdentityModel 6. The links you posted have almost nothing to do with dotnet restore and instead have to do with platform targeting. Aug 12, 2019 · By adding a nuget. I am using standard Dockerfile generated by VS2022 for simple console project in . Sep 3, 2019 · When I run dotnet restore project-file. Coders can take advantage of its built in scripting language, "GML" to design and create fully-featured, professional grade games. May 30, 2023 · I have a simple . csproj instead of just xxxxx. NET Core 1. Apr 28, 2024 · When I start the project with the container launch settings profile, it is working fine, but using the CMD docker build . dotnet test -c Release --no-build --list-tests. csproj file is in the MyAPI/ directory. / RUN npm install # Copiamos todo lo demás COPY . js. Jun 17, 2022 · @Hans Kilian Please change your comment into an answer so I can give you the credit. DockerFile is generated by Visual Studio. Change the statement to. This subreddit is not designed for promoting your content and is instead focused on helping people make games, not promote them. The problem comes when the company pulls my solution to their network and they Oct 16, 2021 · The problem is that dotnet restore does not accept a TargetFamework argument. NET 5, this process worked and resulted in a crossgen'd binary. 62 ms for C:\app\utils\utils. The fix involves exporting the zscaler root certificate and then importing it into the docker image. for me (on windows 10), i right clicked the wifi icon at the bottom right, click "Open network & Internet Settings" then click "Change adapter options", then right click the current adapter I was using for internet (wifi in my case), click properties, go to sharing tab, click "allow other network users to connect through this computer's Jan 28, 2024 · Finally i was able to get this working. 0. $ dotnet --info. 6 sec for C:\app\tests\tests Jul 23, 2020 · Not sure if the OS is an issue then. COPY . Retrying ‘FindPackagesByIdAsync’ for source ‘https://[…]/nuget/v3/flat2/microsoft. NET 6, this same process will fail with the Aug 1, 2020 · I had same problem on Win 10 docker desktop. 4' services: dockertest2: environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_HTTP_PORTS=8080 ports: - "8081:80" Here the problem is after I deploy, I am not able to browse the api swagger pages. NETCoreApp,Version=v2. extensions. config", ""] You can add the source and then have success with your docker build. NET Docker images. I also had to explicitly set -s FEED_URI argument on the dotnet restore command, although the source is also defined in the nuget. ToolPackage. Restore completed in 217. csproj . You can solve this problem by adding USER instructions within your Dockerfile. Starting in . Also if I am in the interactive terminal in Visual Studio I can go to the folder location of the dotnet. sln or dotnet restore solution. May 31, 2019 · I was given a . Apr 19, 2019 · You can provide the source argument multiple times to the dotnet restore command, to feed it multiple sources: -s|--source <SOURCE>. Jan 19, 2024 · Describe the Bug Similar to dotnet/dotnet-docker#3338 and #71856, trying to emulate the linux/amd64 platform when building a docker image on an arm64 computer (i. json . While running an application within a Docker container, it has default access to the root for Linux or administrator privileges for Windows. One thing that PS4 and I both share is that both of us have "dotnet sdk 2. As of January 2023 "dotnet restore --interactive" in many cases will not actually show the prompt and silently wait for 90 seconds, then fail to restore. 0 Dockerfile hangs for a considerable amount of time on the RUN dotnet restore step. This article discusses a peer count issue in the QBFT Network implementation using Node. Try to use "8080:5142", instead of 8080:8080, because it is listening on: localhost:5142. e. g. Finally the NuGet. at Microsoft. Landing into your image through the Dockerfile instead of mounting it as a volume in your docker-compose. Jun 30, 2021 · I'm trying to dockerize my . Run cd dktest. ProjectRestorer. Jan 9, 2020 · Containers: 6 Running: 6 Paused: 0 Stopped: 0 Images: 19 Server Version: 18. Make sure you are on dotnet 5. Restore(FilePath project, PackageLocation packageLocation, String verbosity) at Microsoft. 1' This package may not be fully compatible with your project Sep 30, 2018 · FROM microsoft/dotnet:2. And restore only uses the project file, not code. We can then run dotnet restore, before we copy the /src and /test folders. There is something on your entrypoint line of the Dockerfile to trigger docker into seeing it as invalid json and it's falling back to shell execution of the string instead. net app in docker. Try the specific order in the example I provided. 168. 04, with the goal of hosting my Web APIs in Docker on Ubuntu. 06. NET Core 2. nuget. The problem only occurs in docker, building the project directly through vs studio 2022 succeeds. Config. GameMaker Studio is designed to make developing games fun and easy. 131" --entrypoint /bin/bash --name HostServer hostserver should work - at least, I have the equivalent on my terminal here. 1 console app: |-Dockerfile |-Example1. net core 3. NET Core: Failed to build docker image in Visual studio 2019 May 20, 2017 · 2. There is an Env variable NUGET_XMLDOC_MODE which is set to skip in Docker image provided by Microsoft. As you can see in the file we interpolate the Dec 4, 2023 · Thanks for the response I have already verified all 4 points that you have mentioned still not working I solved the issue by doing Nuget restore and build with dotnet and copying the build files to docker – Dec 12, 2023 · This is the docker-compose. For information about manifest files, see Install a local tool and Invoke a local tool. Then you try to restore it by the dotnet CLI. 1) Create a new . yml. 0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json May 15, 2024 · If the *. Mar 18, 2024 · Because as i see you just need to have your asp. NET Core SDK (reflecting any global. . To address this, you should either (1) specify an image: that has dotnet available Apr 2, 2019 · When building an image for a Linux container on Windows, Docker lifts the contents of the active directory into the MobyLinux VM and all the copy commands and such are run against that path in the MobyLinux VM, not your local filesystem. / doesn't find anything to copy, since your . json. answered Aug 16, 2019 at 11:55. I containerize my application by adding the Dockerfile to my project (right click on the project -> Add -> Docker Support) and I was able to launch it, but now I want to use dotnet watch run inside the container. sln file and nuget. config file. Options--configfile <FILE> Jun 27, 2019 · something like this: FROM microsoft/aspnetcore-build:2. csproj&quot; --verbosity n #10 sha256: Aug 19, 2021 · However, upon switching to a Release configuration, the build fails when the internal dotnet restore command executes. NET Core 3 using Visual Studio 2019. Resource temporarily unavailable Dec 1, 2022 · I have an M1 macbook running Docker Desktop 4. Jan 3, 2018 · Like you discovered in Update II, deleting the broken global setting can help. Nov 23, 2020 · 1. The pattern in the sample is correct. I solved it by setting Settings -> Resources -> Network -> DNS server -> Manual DNS configuration to 8. In the step of dotnet restore; I have tried multiple solutions posted on similar questions but nothing works Apr 4, 2018 · Dotnet restore command fails from Dockerfile for a private NuGet feed. If you change it to ENV NUGET_XMLDOC_MODE=none in your Dockerfile it will fix the issue. Basically, you should instruct the docker build environment to use the proxy by adding build arguments like: docker build --build-arg HTTP_PROXY=<proxy URL> --build-arg HTTPS_PROXY=<proxy URL> -t <application name>. I understand that we can build our Dockerfile with a stage to execute dotnet test and run our unit tests during the docker build. 101. 33 ms for C:\app\dotnetapp\dotnetapp. csproj only works because you copied over the csproj into tests/, not Tests. RUN dotnet restore # Copy everything else and build COPY . fileproviders. csproj I get the following: Nothing to do. /. 8. It looks like you haven't defined an image: for this job and whatever default image you are using does not have dotnet installed (or if you're using a shell runner, your runner system does not have dotnet installed/on PATH). csproj. Recommended action. Jun 15, 2023 · The dotnet tool restore command finds the tool manifest file that is in scope for the current directory and installs the tools that are listed in it. 1. So, to try [dockerizing] myself, I created . This can undermine application security. Install. Jan 26, 2020 · Problem with buildning docker image, RUN dotnet restore : "No such host is known" in VS2019, Windows 0 Docker - ASP. I have created a dot net asp. 300. if for example it has only Debug configuration, then this would result in no tests found: dotnet build -c Release. I don't have experience with running docker in MacOS. I have tried building using both the normal docker build and also docker buildx build. NETFramework, Version=v4. This auditing produces a Apr 26, 2022 · If you're only deploying to Docker, not developing in Docker, then you can simplify this file. 1 application and the docker build fails when it executes dotnet restore. Commit: adab45bf0c. As expeced when running docker-compose it should run API project and launch swagger api page instead it’s displaying different erros when exposed ports are accessed via browser. In order for GitVersion to work correctly, it needs more information from the git repository which isn't available inside your Docker image. WORKDIR /code/app. My question is regarding whether or not we would want those tests to run during local dev (e. Config file, then the directory above, all the way back to the root directory. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. If I clear my proxy environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY), dotnet restore begins working (we also have a private feed on our intranet). The output and intermediate output folders will be /code/obj and /code/bin. nuget/packages. I have a rest api named dsi. I just upgraded to dotnet core 2. None of the projects specified contain packages to restore. Both Dockerfiles, and the local restores should restore the Nuget packages in a similar amount of time. 104". Config under the user's profile will be checked. Apr 25, 2020 · I'm working on a . Net Core Rest API app and checked 'Use Docker Support'. Apr 29, 2020 · By default Docker will assign a randomly chosen host port to a port exposed by a container (the container port). Edit dktest. csproj files haven't changed since the docker build command last ran, the dotnet restore command doesn't need to run again. Also supplying a nuget config file, with the correct proxy settings, does not help. Unfortunately the docker dotnet restore fails. 1 project for a company. ToolPackage The sample Dockerfiles provided above make the assumption that the application's projects are all based on . NET development workflow. Dec 14, 2022 · Since container is not building with the full project I commented docker file as bellow . I want to build my packages on Ubuntu, but some of the NuGet references are hosted on an internal NuGet repository (Artifactory). Oct 31, 2018 · I just started a new solution with a . Jun 13, 2020 · I set up a docker container in order to build a C# project in it. If you do want the project to be working fine everywhere (even if the global might be broken), you can add a nuget. When performing docker restore, when it tries to pull the external NuGet packages, for every package i get. # By copying these into the image when Oct 2, 2021 · In the browser, the package is downloaded but Docker can not download from the same address. Apr 12, 2019 · Check my answer here. You can use specific port on the host by changing the Docker run options used by docker-run: debug task (defined Mar 24, 2019 · minor improvement is to use dotnet run --no-build. This setting overrides all of the sources specified in the NuGet. It could be an I/O issue with the volume, because it has to read and write to the MacOS file Jul 17, 2018 · The OP sturmstrike mentions in the comments "Optimising ASP. It looks a bit hacky but I suggest such an approach. Dec 25, 2023 · I tried to run my multiply dotnet project in a docker container but it didn't not work. For information about where local tools are stored, see dotnet tool install. NET Core Project (2. Here is the content of the file: May 17, 2022 · Reason for change. Feb 15, 2024 · Describe the Bug When building my container on asp. NET Framework project that makes use of a packages. It has some package dependencies hosted in a private Azure Artifact Feed. EXPOSE 80. NET Core apps in Docker - avoiding manually copying csproj files (Part 2)" from Andrew Lock "Sock". For my testing, I only needed to run the application on CentOS, I didn't need to build on CentOS, so that meant I could leave the build stage as it was, building on Debian. I have already checked other threads for this specific problem Nuget connection attempt failed "Unable to load the service index for source". WORKDIR instruction. Jan 19, 2020 · Available commands: dotnet-ef Package "localenv" failed to restore, due to Microsoft. NET 8 containers does not stop the dotnet restore command from hanging. Apr 22, 2018 · Steps to reproduce this are easy. DotNet. Now do rest of the thing which you wanted to do . Oct 29, 2019 · 7. May 14, 2021 · It works properly with ISS Express and Docker but when I run project with docker-compose api project is not working as expected. rest. Config . # Set a working dir at least 2 deep. Multiple sources can be provided by specifying this option Apr 20, 2021 · docker run -it -e IPSettings__IP="192. Creating a CentOS-based ASP. # Required inside Docker, otherwise file-change events may not trigger. Here's what my devcontainer. csproj MyAPI/. Since you build just before running, you can shave a little time off how long it takes your app to start. csproj files. Config file. Even the api direct call also not working. Note, the private Nuget repository URL is reachable outside docker (i. For some reason it is not using the http_proxy or https_proxy settings. I am running on 5. org/v3/index. version: '3. For more information, see Best practices for writing Dockerfiles. NET Core project to run in a Linux Docker container to do the build, everything seems to be okay on the docker configuration side, but when I run this command: dotnet publish -c Rele Jul 18, 2018 · Package 'Microsoft. net 7. csproj |-Example1. I built image with 'Dockerfile' had been given by MS. If you're attempting to build a project that is based on a . Run mkdir dktest. net website project. sln the solution's directory will be checked first for a NuGet. The image is a windows container and this is working on Docker desktop Windows container mode Nov 29, 2023 · dotnet restore -s c:\packages\mypackages -s c:\packages\myotherpackages Restore dependencies and tools for the project in the current directory showing detailed output: dotnet restore --verbosity detailed Audit for security vulnerabilities. override. json looks like: May 16, 2019 · If someone needs a separate Dockerfile for each project, you can put each Dockerfile in the project folder and use docker-compose to build and run them separately. If your credentials are invalid, it will fail, there will be a non-zero exit code. edited Apr 24, 2018 at 12:22. Tools. json): Version: 2. It looks correct in what you pasted, so I'd check for characters like smart quotes or perhaps a Windows newline at the end of the string. 0-preview4-004233, run 'dotnet new' in a temporary directory. You could try, inside of your docker image, cloning the single branch from the git repo being built: git clone -b <branch> <remote-repo>. config files, followed by all the . config to the solution/project and copying it into the Docker project: WORKDIR /src COPY ["nuget. 61' instead of the projecttargetframework '. NET Core app that is set up to build into a Docker image, and then use the VS Mar 20, 2020 · Then, inside my dotnet project folder, I created a . Yes the nuget package sources are stored in nuget Dec 27, 2017 · now in docker file put these statements just before you try to restore package: COPY . 1-sdk AS packager RUN mkdir -p /opt/build WORKDIR /opt/build # Copy csproj and restore as distinct layers COPY *. net core project. The solutions provided there did not help me. What went wrong here. exe) and works on Windows, Mac, and Linux. config file, you'll need to run nuget restore instead of dotnet restore for that project or solution. com/dotnet/dotnet-docker/blob/main/samples/aspnetapp/Dockerfile. dockerignore file to exclude the package and build related files from being COPIED at the docker build stage (also, this is what is being done according to the dotnet-docker-samples). Sep 24, 2019 · I went back to Docker and run the build command again. Learn how to troubleshoot and fix Dotnet Restore issues when using Docker and a . It can run and debug it by setting the docker compose file as a startup project. I refer to MS Menual which give docker sample and commands guidance and It worked well. 4. Restore completed in 3. ENV DOTNET_USE_POLLING_FILE_WATCHER 1. In this case the exposed (container) port is 5000, but it will be exposed on the host via a random port, such as 32737. Steps to reproduce Create a . May 3, 2018 · When you run a nuget restore solution. 1, but dotnet restore is failing. I simply get a connection refused page. ToolPackageException: The tool package could not be restored. then I executed manually dotnet build command inside container. 0 the build fails at dotnet restore. The Azure Artifacts Credential Provider automates the acquisition of credentials needed to restore NuGet packages as part of your . Dec 19, 2018 · I have checked my environmental variables and I see that if I go into my system variables under the path variables I see C:\program files\dotnet. NET Core Web Project 2) Enable Docker support (either through new project wizard or Add context menu) 3) Select Release Mode 4) Hit Play/Debug/Go button. csproj --configfile . Determining projects to restore All projects are up-to-date for restore. Docker can be particular about parameter order. 2. The alternative solution actually uses the wildcard technique I previously dismissed, but with some assumptions about your project structure, a two-stage approach, and a bit of clever bash-work to work around the wildcard limitations. 104-sdk-alpine3. config (and get the case right!), that worked perfectly and my container is built. net core rest api app. Dockerfile Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand May 22, 2022 · 1. js, and how to resolve it. This works fine for me. The 3. net 8. exe, type in the terminal >dotnet --version and a dotnet version shows on my terminal. Instead, the built-in cache for the corresponding dotnet restore layer is reused. Apparently upon trying to pull Nuget packages from a feed, the dotnet restore rejects the SSL certificate provided by the Nuget feed server. I followed tutorials and created a Docker My workaround is to copy the relevant locally cached packages (from C:\Users\username. While this is great for optimising the dotnet restore point, it has a couple of minor downsides: Nov 9, 2018 · I am going to close this issue as it seems to be addressed and to be outside of the CLI. Also, the COPY . Just because your answer is tangentially related does not make it a good answer Apr 10, 2019 · Before running the “dotnet restore” command, and in the same work directory, we run an Echo command redirecting to the Nuget. I added the following lines to the dockerfile just before the dotnet restore command: Jul 11, 2022 · 1. 8 And then inside the container: cd project dotnet restore TestProject. abstractions/index. , I get this error: Error NU1301: Unable to load the service index for source https://api. If we run (F5) a . 7600. COPY *. Feb 25, 2019 · 1. It will build and run the container no problem. Specifies a NuGet package source to use during the restore operation. When I try to build for amd64 the build gets hung up on the dotnet restore command. Macbook) cause the build to hang when the dotnet restore command is ran. Note: This is the root for git and so the Dockerfile becomes a part of the code repo as well. In . my os is windows 10, and I'm using docker desktop on it to build image, I created the image in both ways, both by Visual Studio and Docker Command(docker-compose up) I encountered the same problem in both ways Mar 11, 2019 · RUN dotnet restore COPY package. sln |-Program. I could script that, but I'd rather not take a platform or even third-party dependency for the Docker build, I'd like to keep it working with docker compose up --build. This time dotnet restore worked as expected: Step 7/23 : RUN dotnet restore —> Running in 8fc8b2e1bdf7 Restore completed in 261. Jan 31, 2020 · I tried the same thing locally (credential provider installed) and everything is working fine. QBFT Network: Peer Count Issue in Node. config in the solution folder, and force to override all critical settings (like sources and so on). May 9, 2023 · The only solution that I managed to get to work was utilizing artifacts credentials provider as stated here: Artifacts credentials provider documentation. I am running . Feb 13, 2018 · As you can see, the first things we do are copy the . NET Core image. Other than realising I had to ADD and not COPY the nuget. Oct 25, 2019 · 4. COPY MyAPI/MyAPI. WORKDIR /app. Below is my dockerfile. Steps to reproduce the issue Mar 19, 2023 · Try applying this pattern: https://github. Additional resources Jul 18, 2022 · 5) Run as a Non-root User for Security Purposes. You can simply create a test C# project with one reference to the package from your private repository. – Jun 14, 2018 · 3. NET 6 C# Web API that I want to host in a Linux container. @JasonPan, an obvious solution, but for some reason it does not fix the problem. NET. nuget\packages ) to a packages folder on the root of the project and then add this line to the Dockerfile above the restore command: COPY packages /root/. NET 7 project in Visual Studio 2022. #10 [build 6/6] RUN dotnet restore &quot;BFG. config files. Nov 11, 2021 · In the original sequence, it's copying the restored packages from dotnet restore to /src/xxxxx/ directory in the container. This is my new Dockerfile Seems working in console, but in Chrome doesn't. bp uo gz nf xd de sc mb oa ye