Public | Automated Build

Last pushed: a month ago
Short Description
A generalised ASP.NET Core builder Docker image
Full Description

A generalised ASP.NET Core builder Docker image

This repo contains a Dockerfile that can be used to build ASP.NET Core images where they conform to a standard layout:

  • Should have a single .sln file in the root folder
  • Should have all library and app projects in a src subdirectory
  • Should have all test projects in a test subdirectory

The image uses Docker's ONBUILD command to execute the following in your project's directory:

  1. Copy the .sln file and NuGet.config
  2. Copy the .csproj files into the image and run dotnet restore (to take advantage of Docker's layer caching mechanism)
  3. Set the version number to the value of the BUILD_VERSION argument (passed view --build-args, for example)
  4. Copy the source code to the builder image and run dotnet build
  5. Run dotnet test on every project in the test folder
Docker Pull Command
Owner
andrewlock
Source Repository