How to add docker support for an Angular 7 application using VS2017? How to add docker support for an Angular 7 application using VS2017? kubernetes kubernetes

How to add docker support for an Angular 7 application using VS2017?


I do not know the book that you referenced. But in general the steps would be:- Try to run your application locally from command line (I guess it can be started with dotnet run).- Create a Dockerfile- Use official docker images that already include dotnet framework as Base-Image (e.g.: from microsoft/dotnet:runtime)- In your Dockerfile you can add as much as you want (install dependencies, run unit-tests, etc.), but to keep it simple the following should be enough:

Dockerfile:

from microsoft/dotnet:runtimeCOPY . .RUN dotnet restoreRUN dotnet buildENTRYPOINT ["dotnet", "run"]
  • To optimize for performance you can use multi-stage docker images and split your Dockerfile into build and runtime

Note, that I didn't read your tutorial, but this is how I would start with preparing for docker

To work with kubernetes you can simply push your docker image (docker build -t <your-tag>) to a docker-registry, which your kubernetes cluster has access to and create a k8s-deployment for that contains that image. Locally you don't need a docker-registry but can simply kubectl run ...

See: