devxlogo

Visual Studio Tools for Docker

Visual Studio Tools for Docker

You can now create ASP.NET Docker containers from within your Visual Studio IDE with the release of Visual Studio 2015 Tools for Docker. Note that the tool is still in preview.

This is definitely a good news for those looking to run ASP.NET on Linux. You can also very easily host the container running on a Linux VM in Microsoft Azure. The tool installs the Docker command line interface (CLI) for full control of the container environment using PowerShell and also provides an easy to publish user interface that integrates with the web publishing mechanism available with Visual Studio. It also automatically generates the necessary certificates.

You can use the tool to configure a Docker container based on a Linux VM to host in Azure. Next you can create a publishing profile on your ASP.NET 5 web application project. The publishing profile will allow you to choose a Docker container as a publish target. Once you have configured the profile, you can right click on your web project to deploy the updates to the configured container in literally a single click.

You can also automate the publishing using MSBuild, PowerShell or Bash script from a Linux or Mac machine. You need to specify the publishing profile in your choice of script.

The following example illustrates using PowerShell to publish your ASP.NET 5 web application to a hosted or on premise container as configured in the publishing profile:

.aspnet5-Docker-publish.ps1 -packOutput $env:USERPROFILEAppDataLocalTempPublishTemp -pubxmlFile . aspnet5-Docker.pubxml

You also have the option to turn on/off the process of creating a Docker container with the publish profile and you can choose to only create the image in your Docker host by setting the DockerBuildOnly?configuration section to true or false.

Note that the .NET Core is still being built for Docker so, for this release, the tool uses the Mono runtime to provision your .NET applications.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist