/docker-aspnetcore-netfx-sample

Docker sample: ASP.NET Core MVC targeting full .net framework

Primary LanguageC#MIT LicenseMIT

Docker with ASP.NET Core MVC targeting full .net framework

This sample demonstrates using ASP.NET Core MVC targeting full .net framework and deploying this to Docker

This sample requires Docker 18.09 or later of the Docker client.

Try a pre-built ASP.NET Docker Image

You can quickly run a container with a pre-built sample ASP.NET Core Docker image.

  1. Start the container:
    • docker run --rm --name api -p 8080:80 -it -e christianacca/aspnetcoreapp-netfx-sample
  2. Browse to the api endpoint at: http://localhost:8080/api/values

To cleanup:

  • [CTRL]+C

Build and run the sample with Docker

You can build and run the sample in Docker using the following commands. The instructions assume that you are in the root of the repository.

  1. Clone the sample repository with git:
  2. Open a powershel prompt and change directory to the folder containing docker-compose.yml file
  3. Build and start the container:
    • docker-compose up -d --build
  4. Browse to the api endpoint at: http://localhost:8080/api/values

To cleanup:

  • docker-compose down