.NET Core Docker Image for SPA Applications

前端 未结 6 1519
鱼传尺愫
鱼传尺愫 2020-12-08 16:05

What is the correct Docker image to use when creating a new ASP.NET Core MVC app, specifically with the React/Redux (or other Node.js required) template? If not a specific i

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 16:30

    I got the Angular example template to work simply by installing nodejs into the base:

    FROM microsoft/aspnetcore:2.0 AS base
    RUN apt-get update && \
        apt-get install -y wget && \
        apt-get install -y gnupg2 && \
        wget -qO- https://deb.nodesource.com/setup_6.x | bash - && \
        apt-get install -y build-essential nodejs
    WORKDIR /app
    EXPOSE 80
    ... rest of Dockerfile ...
    

    Everything else (Webpack Hot swap) didn't throw an error.

提交回复
热议问题