Skip to content

johan-v-r/DotNetCore_WebApi_Docker

Repository files navigation

DotNet Core WebApi Console App

.Net Core 1.0 WebApi designed using VS Code (no solution or project files available for VS).

Run dotnet restore to download packages used specified in project.json.

Packages

Running on top of the .Net Core, AspNetCore.Mvc is used for the routing set up. AspNetCore.Server.Kestrel is used for hosting.

VS Code

The .vscode folder contains settings to build the application (Ctrl + Shift + B) as well as launch configurations to debug with .Net Core.

Extensions

C# for VS Code by OmniSharp

.Net Core Project Manager (Nuget)

Docker

See tutorial for Getting Started with Docker for Windows

A Dockerfile is in the source. On building, it will get the microsoft/dotnet image and copy this source to the container. Build by navigating to source and run command: docker build -t [docker_image_name] .

Later the packages can be excluded, as it will run dotnet restore to get all the libraries needed.

By default the Kestrel server will listen to port 5000, so be sure map this port when running the image docker run -p 5000:5000 [docker_image_name]

Also when running from a VM, remember to map its ports as well to make it accessible.

About

.Net Core Web API hosted in Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages