I'm completely lost on this.
I have installed Docker on my Windows 10 machine. It is running. I shared out my C drive in Settings. I then created an ASP.NET Core 1.1 project with Docker support in Visual Studio 2017 RTM. Once the project was created, I hit F5 to run it. It built the container, deployed it to my local Docker installation, and launched my web browser. There is my web site running! Yay!
I'd now like to take that container, and deploy it to Docker running on a Linux machine, but there is no Publish option in Visual Studio for the docker-compose project. I can Publish the web project, but only to Azure or IIS.
I have looked all over for an answer to this, but all I can find is how to deploy locally, and I've already figured that out.
Right-click on the project node and choose Publish.... A screen showing deployment options appears. Choose Docker Container Registry, and then choose Docker Hub. Enter your Docker credentials.
To attach to a running process in a Windows Docker container: In Visual Studio, select Debug > Attach to Process (or CTRL+ALT+P) to open the Attach to Process dialog box. Set the Connection type to Docker (Windows Container). Select Find... to set the Connection target using the Select Docker Container dialog box.
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.
Visual Studio Container Tools requires Docker to be running before building, debugging or running a containerized project. Please review the attached image. If i build and run the project using docker cli, it's working.
There is currently no publish option from within the tooling that will push an image to a registry, but you should be able to do this fairly easily. I would recommend to build the "release" configuration of the docker-compose project which should build an image locally. You can then use the docker command line to push that image to Docker Hub or Azure Container Registry, in which you can then pull it down to the Linux docker machine.
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