Click here to Skip to main content
15,885,546 members
Articles / Containers / Docker

Publishing your ASP.NET App to Linux in 5 minutes with Docker

Rate me:
Please Sign up or sign in to vote.
4.60/5 (6 votes)
12 May 2015CPOL1 min read 35.1K   13   15
Publishing your ASP.NET app to Linux in 5 minutes with Docker

In this section, I will demonstrate how to publish your ASP.NET APP on Linux VM using Docker extension of Visual Studio 2015. So, before we begin, we must need VS 2015 RC candidate installed on our machine. Then, we do need Docker extension for Visual Studio installed on our machine. You can install the same from Extension and Updates as shown below in the screen shot.

1st

Then, I need to create new ASP.NET 5 website as shown below in the screen shot.

1st

2nd

3rd

Once site got created successfully; then simply rt-click on the website and say Publish as shown below.

2nd

Then, it will provide the below options.

3rd

Now, if you don’t have any subscription, then you need to create one and provide the details in the next screen. For privacy reason, my details are hidden.

4th

5th

Then, it will give the below confirmation message.

6th

When you say ok here, it will build the app and prepare for hosting. You can check the status of the same in the output window when Azure is provisioning things for you. This process will take some time.

7th

Once it's completed, it will show the confirmation message as shown below:

8th

Now, I will come to and say publish, this time it will come in connections tab with below VM credentials.

9th

Then you can click on validate Connection for confirming everything is correct. Once verified, then you can go ahead and click next and publish the app.

10th

11th

While building the app, you can check the status in the output window.

12th

13th

14th

Once done, it will launch the same in the browser. Also, it launched in my new Project Spartan browser as I’m running on Windows 10 machine.

15th

Thanks for reading!

Image 19

This article was originally posted at http://myview.rahulnivi.net?p=1749

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Publicis Sapient
India India
Hey there, it's Rahul Sahay! I'm thrilled to be a platform specialist at Publicis Sapient, where I get to work on some exciting projects. I've been honing my skills in various aspects of the software development life cycle for more than 15 years, with a primary focus on web stack development. I've been fortunate to have contributed to numerous software development initiatives, ranging from client applications to web services and websites. Additionally, I enjoy crafting application architecture from scratch, and I've spent most of my time writing platform agnostic and cloud agnostic code. As a self-proclaimed code junkie, software development is more than just a job to me; it's a passion! And I consider myself lucky to have worked with an array of cutting-edge technologies, from .NetCore to SpringBoot 3, from Angular to React, and from Azure to AWS and many more cousin technologies...

- 🔭 I’m currently working @ below tech stacks
- Microservices,
- Distributed Systems,
- Spring Boot
- Spring Cloud
- System Design,
- Docker,
- Kubernetes,
- Message Queues,
- ELK Stack
- DotNetCore,
- Angular,
- Azure

- 💬 Ask me anything about my articles [My View](https://myview.rahulnivi.net/)
- 📫 How to reach me: [@rahulsahay19](https://twitter.com/rahulsahay19)
- 📫 Github: [@rahulsahay19](https://github.com/rahulsahay19)

Comments and Discussions

 
NewsNo more "docker containers" option in latest version.. Pin
User 1013254617-Apr-16 23:27
User 1013254617-Apr-16 23:27 
QuestionAsp .Net App on linux VM Pin
Member 1169211914-May-15 19:54
Member 1169211914-May-15 19:54 
AnswerRe: Asp .Net App on linux VM Pin
rahulsahay2015-May-15 0:01
rahulsahay2015-May-15 0:01 
Questioncan asp.net be hosted in linux / php host now? Pin
digish77713-May-15 19:11
digish77713-May-15 19:11 
AnswerRe: can asp.net be hosted in linux / php host now? Pin
rahulsahay2013-May-15 21:25
rahulsahay2013-May-15 21:25 
GeneralRe: can asp.net be hosted in linux / php host now? Pin
digish77714-May-15 5:44
digish77714-May-15 5:44 
GeneralRe: can asp.net be hosted in linux / php host now? Pin
rahulsahay2014-May-15 18:58
rahulsahay2014-May-15 18:58 
Offcourse. Initially when .Net was not open source you couldn't host the same other than Windows environment. It has dependency on the same. But, now since it is coming with cloud optimized version; that means it will create one mini self-hostable environment on every platform. Thats why every thing is coming via nuget package. Even CLR can be installed via nuget package.
Rahul Sahay
Happy Coding
http://myview.rahulnivi.net

GeneralRe: can asp.net be hosted in linux / php host now? Pin
amigoface21-Nov-15 22:26
amigoface21-Nov-15 22:26 
Questiongood thought i was looking for something like this Pin
digish77713-May-15 19:11
digish77713-May-15 19:11 
AnswerRe: good thought i was looking for something like this Pin
rahulsahay2013-May-15 21:21
rahulsahay2013-May-15 21:21 
GeneralMy vote of 5 Pin
Arunraj Chandrasekaran13-May-15 16:49
Arunraj Chandrasekaran13-May-15 16:49 
Questionthis only works with Azure? Pin
luizfredericojr13-May-15 7:50
professionalluizfredericojr13-May-15 7:50 
AnswerRe: this only works with Azure? Pin
rahulsahay2013-May-15 21:23
rahulsahay2013-May-15 21:23 
GeneralMy vote of 4 Pin
Santhakumar Munuswamy @ Chennai12-May-15 9:34
professionalSanthakumar Munuswamy @ Chennai12-May-15 9:34 
GeneralRe: My vote of 4 Pin
rahulsahay2012-May-15 23:09
rahulsahay2012-May-15 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.