Sign inSign up

andrewlock/aspnetcore-build

By andrewlock

Updated about 8 years ago

A generalised ASP.NET Core builder Docker image

Image
0

785

andrewlock/aspnetcore-build repository overview

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

Tag summary

Content type

Image

Digest

Size

566.6 MB

Last updated

about 8 years ago

docker pull andrewlock/aspnetcore-build