Reputation: 3651
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:
Upvotes: 5
Views: 1827
Reputation: 29976
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
Upvotes: 3