.NET Docker Development with Visual Studio 2017

Sign in to queue

Description

Develop .NET Framework Apps with Windows Server Core Containers and .NET Core with Linux Containers with the productivity you'd expect from Visual Studio, while maintaining the native Docker experience.

Get started today by downloading Visual Studio 2017, visit: http://www.visualstudio.com/vs/whatsnew

For more information, check out these courses on Microsoft Virtual Academy:

Day:

0

Session Type:

Pre-recorded

Code:

T111

Embed

Download

The Discussion

  • User profile image
    BobTabor

    Brilliant!  Any chance we can look at the entire Magic 8 Ball solution incl. the Docker project to dissect and ruminate on it?  Thanks!

  • User profile image
    SteveLas

    Hi Bob,

    Yes, the sample is located here: https://github.com/SteveLasker/AspNetCoreMultiProject

    Happy coding...

  • User profile image
    dderman

    This is amazing!!!  One question though...  Let's say I have a database on my local pc.  How do I give my API, running in a container, access to it?

  • User profile image
    dderman

    I think I figured out my own answer.  I just opened up my firewall to port 1433 (sql port).  Then I access it in the container using the ip address 10.0.75.1.  Can anyone confirm if that is the right way to do it?

  • User profile image
    NathanAlard

    Docker Support Freakin Fantastic!!!

  • User profile image
    suensky

    @dderman:Yes, it's one of the approaches. You can also host your database in a container and make the web api talk to the database hosted in another container.

  • User profile image
    rboban

     Hi,

    I don't have that option in my VS 2017 Enterprise (15.0.26228.9). I cannot find it in Visual Studio Installer too.

    Regards,
    Robert

     

  • User profile image
    lef

    I think I figured out my own answer.  I just opened up my firewall to port 1433 (sql port).  Then I access it in the container using the ip address 10.0.75.1.  Can anyone confirm if that is the right way to do it?

    Hi @dderman: I've tried to do the same, but it's still not working for me. How did you figure out the IP address? Could mine be different? and did you specify the ports 1433:1433 in compose file?

  • User profile image
    Andy

    Awesome!
    Seemless integration with docker.
    very cool indeed..
    Tks

  • User profile image
    Joe Hoeller

    In case anyone is having issues running .NET Core v1.1.1 inside a Docker Container, and then deploying to a Linux Server, I made this tut:

    https://www.linkedin.com/pulse/net-core-v111-docker-container-linux-tutorial-joe-hoeller-?published=t

  • User profile image
    Joe Hoeller

    Typo in URL above, Correction:

    https://www.linkedin.com/pulse/net-core-v111-docker-container-linux-tutorial-joe-hoeller--1

  • User profile image
    Peer Jakobsen

    How does the web app know where the api app is?

    The web app uses the following:
    public Magic8BallController()
    {
    _doSomethingBaseAddress = "http://api";
    _doSomethingAPIUrl = "/Magic8BallApi";
    }

    But how does that web container know that the api DNS entry maps to the api container?

  • User profile image
    Munro77

    @Peer Jakobsen: It should be a native feature of Docker - Docker DNS knows the lookup of other containers by name.

    https://docs.docker.com/engine/tutorials/networkingcontainers/

  • User profile image
    Robert Raboud

    Is it possible to host an ASP.Net Core app in a windows container instead of a Linux container. I get an error when i try.

  • User profile image
    DanJ210

    When using the ASP.Net Core template... How can I switch from using Linux containers to Windows containers?

  • User profile image
    jasonalls

    Excellent tutorial, very helpful. Thanks.

  • User profile image
    Dave

    DanJ210, he subtly covered that at 9:07 when he switched to .net framework. If you're wondering how you can use dotnetcore on windows I would go into the dockerfile and change the image's tag to one that is windows based.

  • User profile image
    Niner708516

    Scenario

    I have a Nano Server running on a physical machine.

    The Nano Server has containers enabled and Docker installed.

     

    Is it possible for another machine (physical or vm) on the same subnet running VS2017 to use the new Docker tools to deploy/test to that nano server from within VS2017?

    If so how?

Add Your 2 Cents