I created a new web project on Visual Studio 2019 using the built in Angular template (ASP.NET Core 3).
Then, i Added a docker support using the wizard of visual studio (Right click on the project name -> Add -> Docker Support).
While the project working fine when i launching it from the visual studio using IIS Express, i am getting the following error when launching it using Docker:
I assume that something is missing in the docker file. This is the content of mine:
For this error, it is caused that node
is not installed in mcr.microsoft.com/dotnet/core/aspnet:3.0-stretch-slim
image, try to change your dockerfile to install node
with version 10 or later.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-stretch-slim AS base
# BEGIN MODIFICATION - Node is needed for development (but not production)
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install --assume-yes nodejs
# END MODIFICATION
WORKDIR /app
EXPOSE 80
EXPOSE 443
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With