Tag: angular度cli

即使Docker构build映像时安装了angular-cli ng命令,也不会发现这个命令

我试图用angular-cli作为控制器来构build一个应用程序的图像。 在使用ng build –prod命令ng build –prod时, ng build –prod器崩溃。 我试图在全局或本地文件夹上实现angular-cli,但每次调用ng命令时,构build控制台都表示无法在不是angular-cli应用程序的文件夹上构build。 问题是docker构build过程运行在正确的文件夹上ng build 。 这是我的docker文件。 错误信息: The command '/bin/sh -c ng build –prod' returned a non-zero code: 127其他错误信息: /bin/sh: 1: ng: not found FROM node:6.9.1 ENV DEBIAN_FRONTEND noninteractive ADD ./ /opt/ RUN cd /opt/ && ls -l ### MYSQL RUN apt-get update && apt-get install -y […]

为Angular CLI创buildDocker容器

我正在尝试为Angular CLI创build一个Docker容器。 我的Dockerfile看起来像这样: FROM node:8.1.4 RUN npm install -g @angular-cli 但是,Docker不喜欢运行命令中的@字符。 npm info using node@v8.1.4 npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "@angular-cli": Tags may not have any characters that encodeURIComponent encodes. 我也试图逃避@ ,但同样的错误。 FROM node:8.1.4 RUN npm install -g \@angular-cli Angular CLI文档说我需要@字符。 如何在Docker RUN命令中执行此操作?

在Docker中运行Angular2应用程序

我试图在docker中运行我的ng2应用程序。 我有Docker文件: FROM ubuntu:latest RUN apt-get update #Install curl & git RUN apt-get -qq -y install curl RUN apt-get install -yqq git #Download and install nodejs-6 RUN curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh RUN bash nodesource_setup.sh RUN apt-get install -yqq nodejs RUN apt-get install -yqq build-essential RUN npm install -g angular-cli #Clone the project RUN git […]