Tag Archives: docker

ASP.NET MVC 5 Preview

Managed to get ASP.NET 5 preview up and working via Visual Studio 2015 RC in a Docker container hosted on my local Ubuntu server (read; not an Azure hosted server). All in Oracle VirtualBox Virtual Machines.

ASP.NET 5 Preview Running on a Local Docker Ubuntu VM
ASP.NET 5 Preview

My VirtualBox host is a Windows 8.1 box and I used two VMs: a Windows 7 Development Box (I tried Windows 8.1 in a VM and the performance was terrible) and a Ubuntu Server 14.04.2.

For the most part it was pretty much documented here. My only hiccup was that I had to do a “Restore Packages” to get Grunt to install its packages, this didn’t happen with a “Rebuild” as I would expect. I set my “Custom Docker Host” settings like this:

Custom Docker Settings For Publishing To Docker Server
Custom Docker Settings

After publishing from Visual Studio I was able to get a list of the images on the Docker server and it now included the new published app:

{
    Created: 1432561734,
    Id: "0ad5302ad774376604042790713f79ffa98fceca9826159bcd93b1e20dfce552",
    Labels: {},
    ParentId: "becb4b73fe255ab7284cfdcf3f5768520736317cd5f0456bf169bb9f441763d3",
    RepoDigests: [],
    RepoTags: [
        "helloworldweb1:latest"
    ],
    Size: 0,
    VirtualSize: 756665995
},

So the next challange is to get MongoDB setup running in a Dockerized instance on my Ubuntu server then create a ASP.NET MVC application consuming that server and publish that via Docker and see how performance and maintenance plays out.

 

ASP.NET 5 on Ubuntu on VirtualBox

I figured out the magic sauce for getting ASP.NET 5 running on Ubuntu 14.04 in a VirtualBox VM.

asp_6_on_ubuntu_vm

I followed this mostly for the setup but your Dockerfile should look like this:

FROM microsoft/aspnet

COPY project.json /app/

WORKDIR /app

RUN ["dnu", "restore"]

COPY . /app

EXPOSE 5004

ENTRYPOINT ["dnx", "project.json", "kestrel"]

Be sure and set your VirtualBox setting to “Bridged” so you can hit the IP from your workstation.

Enjoy!