我是 Docker 的完全新手,目前正在尝试使用 Angular 项目创建 ASP.NET Core 2.1。我在 Docker for Windows 上使用 Linux Container,我的 IDE 是 VS2017 社区版。
目前,我收到此错误:
[1] Ensure that 'npm' is installed and can be found in one of the PATH directories. Current PATH enviroment variable is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Make sure the executable is in one of those directories, or update your PATH.
在 microsoft/dotnet:2.1-aspnetcore-runtime 容器镜像中,未安装 npm/nodejs。要在容器中安装它,请更新 docker 文件
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
# Setup NodeJs
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
# End setup
WORKDIR /app
EXPOSE 80
关于angular - 为 ASP.NET Core 2.1 Angular 项目配置 Dockerfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50859980/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |