Skip to content

mjisaak/docker-dotnetcore-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Build container for dotnet Angular projects

mjibrandl/dotnetcore-angular is a docker image to build dotnet core based Angular projects.

This image is based on microsoft/dotnet:2.2-sdk and contains everything you need to build a dotnet core based Angular project:

  • Node.js 8.x LTS
  • NPM (latest)
  • node-sass (latest)
  • Angular CLI (latest)

The image will reduce your build time to a minimum since you don't have to run npm rebuild node-sass for every build.

Build Status

Usage

Consider you created a project using dotnet new angular -o MyAngular, all you need to containerize your project is the following Dockerfile:

FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mjibrandl/dotnetcore-angular:latest AS build
WORKDIR /src
COPY ["MyAngular.csproj", "./"]
RUN dotnet restore "./MyAngular.csproj"
COPY . .
WORKDIR "/src"
RUN dotnet build "MyAngular.csproj" -c Release -o /app

FROM build AS publish

RUN dotnet publish "MyAngular.csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "MyAngular.dll"]

About

Docker image to build dotnet core based Angular projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published