I'm using VS 2017. I have a web service and I want to add docker support to it. When I right click and open up the menu to add docker support it is greyed out. What causes it to be greyed out? How can I add docker support to my app?
*Side note I went up to the solution and added a new project (web app) and when it's done adding that new project I'm able to add docker support to it but still not able to add support to my other web service. Also both projects are targeting .net Framework 4.5.2
Existing app Open the project in Visual Studio, and choose one of the following options: Select Docker Support from the Project menu. Right-click the project in Solution Explorer and select Add > Docker Support.
Right-click on your project and select Add | Docker Support. You'll get a dialog asking you to pick what operating system your container should use -- pick the same one you chose when installing Docker for Windows.
To add container orchestration support, right-click on the project node in Solution Explorer, and choose Add > Container Orchestration Support. Then choose Docker Compose to manage the containers. If docker-compose. yml already exists, Visual Studio just adds the required lines of configuration code to it.
Try double-checking your .csproj, .sln, and solution and project folders for any references to Docker. There have been a few times where I have run into this, usually caused by adding, removing, and trying to re-add Docker support. Clearing out the Dockerfile in the project folder along any other Docker stuff in the solution solved the issue in my case.
Edit the .csproj file and search for "docker" - remove the following line:
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
Also delete the file "Dockerfile" which should be in the same folder as the .csproj file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With