Tag: 量angular器

在Docker中运行的量angular器testing中使用Chrome驱动程序

我在使用量angular器的Docker中工作时遇到了一些麻烦,下面是我的protractor.conf.js文件: 'use strict'; const seleniumHost = process.env.CDT_SELENIUM_HOST || 'localhost'; const cdtServerHost = process.env.OPENSHIFT_NODEJS_IP || 'localhost'; const cdtServerPort = process.env.OPENSHIFT_NODEJS_PORT || 3040; const jasmineReporters = require('jasmine-reporters'); const util = require('util'); /////////////////////////////////////////////////////////////////////////////// exports.config = { params: { env: process.env.CDT_PROTRACTOR_ENV || 'local' }, noColors: process.env.PROTRACTOR_NO_COLORS === 'yes', chromeDriver: '/usr/bin/google-chrome', onPrepare: function () { global.projectRoot = String(__dirname); let env […]

Docker – 带有Angular 4模板的ASP.NET Core 2.0

我在Angular模板的ASP.NET Core 2.0中创build了一个基本的应用程序,添加了Docker支持,构build它,运行它,但是当我在浏览器中导航到容器IP时,我只是在我的应用程序中获取Error页面。 没有Angular模板的基本Web应用程序对相同的Docker文件工作得很好,所以我认为这与Angular路由相关。 这是否发生给其他人? 这是我的Dockerfile: FROM microsoft/aspnetcore-build:2.0 AS build-env WORKDIR /app # copy csproj and restore as distinct layers COPY *.csproj ./ RUN dotnet restore # copy everything else and build COPY . ./ RUN dotnet publish -c Release -o out # build runtime image FROM microsoft/aspnetcore:2.0 WORKDIR /app COPY –from=build-env /app/out . ENTRYPOINT […]

ChaosMonkey错误:HTTP错误:500 com / google / inject / internal / util / $前置条件

我按照这个教程mlafeldt / chaosmonkey设置了chaos monkey 这是我如何开始docker集装箱 docker run -it –rm -p 8089:8080 \ -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=someValue \ -e SIMIANARMY_CLIENT_AWS_SECRETKEY=someValue\ -e SIMIANARMY_CLIENT_AWS_REGION=someValue \ -e SIMIANARMY_CHAOS_TERMINATEONDEMAND_ENABLED=true \ -e SIMIANARMY_CHAOS_ASG_ENABLED=false \ -e SIMIANARMY_CHAOS_LEASHED=false \ -e SIMIANARMY_CHAOS_SHUTDOWNINSTANCE_ENABLED=true \ -e SIMIANARMY_CHAOS_BLOCKALLNETWORKTRAFFIC_ENABLED=true \ -e SIMIANARMY_CHAOS_DETACHVOLUMES_ENABLED=true \ -e SIMIANARMY_CHAOS_BURNCPU_ENABLED=true \ -e SIMIANARMY_CHAOS_BURNIO_ENABLED=true \ -e SIMIANARMY_CHAOS_KILLPROCESSES_ENABLED=true \ -e SIMIANARMY_CHAOS_NULLROUTE_ENABLED=true \ -e SIMIANARMY_CHAOS_FAILEC2_ENABLED=true \ -e SIMIANARMY_CHAOS_FAILDNS_ENABLED=true […]

运行干净的validation-Denv = dev错误

美好的一天,当我运行命令 clean verify -Denv=dev 我有这个错误 :未能执行目标org.codehaus.mojo:exec-maven-plugin:1.6.0:exec(安装npm)在项目上monitopsy-web:命令执行失败。 不能运行程序“npm” 你能帮忙吗?

何修复nginx的configuration文件,以便能够服务于不同的语言?

我使用泊坞窗来服务我的angular度应用程序,这也是使用国际化的function几种语言。 使用以下命令将docker run -d -p 9090:80 -v "$(pwd)/dist:/usr/share/nginx/html" -v "$(pwd)/app.conf:/etc/nginx/conf.d/default.conf" nginx:alpine指向dist文件夹: docker run -d -p 9090:80 -v "$(pwd)/dist:/usr/share/nginx/html" -v "$(pwd)/app.conf:/etc/nginx/conf.d/default.conf" nginx:alpine 正如你可以在命令行中看到的那样,我还将try_files指令保存在app根目录中作为app.conf ,以便在重新加载页面/应用程序或直接针对特定的路由/上下文时避免出现404 NGINX错误 。 server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html index.htm; location / { try_files $uri /index.html; } } 一切正常,我可以达到: localhost:9090/home除非当我尝试导航到一个特定的语言,如localhost:9090/es/或localhost:9090/en/然后我得到的错误: ERROR Error: Uncaught (in promise): Error: Cannot match any […]

节点ArrayLiteralExpression未通过testing“isTypeNode”

它成功地build立在本地环境中,但是当它在Docker中build立时,代码将会落在: Error: Debug Failure. False expression: Unexpected node. Verbose Debug Information: Node ArrayLiteralExpression did not pass test 'isTypeNode'. at visitNode (/opt/front-new-kf.expert/node_modules/typescript/lib/typescript.js:51067:18) at Object.visitEachChild (/opt/front-new-kf.expert/node_modules/typescript/lib/typescript.js:51198:265) at visitNode (/opt/front-new-kf.expert/node_modules/@angular/compiler-cli/src/transformers/lower_expressions.js:76:33) at visitNodes (/opt/front-new-kf.expert/node_modules/typescript/lib/typescript.js:51104:48) at Object.visitEachChild (/opt/front-new-kf.expert/node_modules/typescript/lib/typescript.js:51353:355) at topLevelStatement (/opt/front-new-kf.expert/node_modules/@angular/compiler-cli/src/transformers/lower_expressions.js:84:33) at Array.map (<anonymous>) at visitSourceFile (/opt/front-new-kf.expert/node_modules/@angular/compiler-cli/src/transformers/lower_expressions.js:94:51) at transformSourceFile (/opt/front-new-kf.expert/node_modules/@angular/compiler-cli/src/transformers/lower_expressions.js:135:12) at /opt/front-new-kf.expert/node_modules/@angular/compiler-cli/src/transformers/lower_expressions.js:148:20 我的package.json: "dependencies": { "@agm/core": "^1.0.0-beta.0", "@angular/animations": "~5.0.5", "@angular/common": […]

Docker Angular Node Sass无法为您当前的envfind一个绑定:使用Node.js 8.x的Linux 64位

我正在尝试Dockerize MEAN应用程序,并遇到有关Angular容器的问题。 ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/custom_theme.scss angular_1 | Module build failed: Error: Missing binding /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node angular_1 | Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x angular_1 | angular_1 | Found bindings for the following environments: angular_1 | – Windows 64-bit with Node.js 8.x angular_1 | angular_1 | This […]

在Docker镜像中的构build错误

让我先说这个,说我不能公开仓库。 我会尽可能地提供更多的信息来帮助理解这个问题。 我有一个Angular CLI生成的项目,Angular版本是4.4.6,Angular CLI的项目和全局版本都是1.5.5。 当我运行ng serve , ng build , ng build –prod ,或ng build –env=someEnv ,项目build立得很好。 我从本地生成输出中删除了所有的错误。 当我尝试执行项目的多阶段Dockerfile图像构build时出现问题。 这里是Dockerfile: FROM johnpapa/angular-cli as angular-build WORKDIR /usr/src/app COPY package.json package.json RUN npm install –silent COPY . . RUN ng build –prod FROM nginx:alpine LABEL author="Preston Lamb" COPY nginx.conf /etc/nginx/nginx.conf COPY –from=angular-build /usr/src/app/dist /usr/share/nginx/html EXPOSE 80 […]

如何使用docker在asp.net内核中创buildangular度4应用程序设置的图像

我已经在asp.net内核中build立了一个angular度为4的应用程序。 当我从VS构build它时,一切都很好,而且工作。 现在我想用docker创build一个映像来运行一个容器。 Dockerfile是这样的: 从微软/ aspnetcore构build为build设环境 WORKDIR /源 COPY。 。 RUN dotnet恢复 RUN dotnet发布-o /发布 – configuration发布 从microsoft / aspnetcore: WORKDIR /应用程序 COPY –from = build-env / publish。 入口点[“dotnet”,“MyApp.dll”] 当我运行docker-compose,我可以看到网站运行没有angular度。 看来我需要安装npm或更多的东西,但是,我找不到合适的解决scheme谁来configurationdockerfile来build立asp.net核心和angular4。 有谁能提供一个例子吗? 谢谢

在minikube docker容器中使用angular2应用程序获取“无效的主机头”

我试图部署一个Angular2应用程序(基本ng新模板,唯一的区别是,我有更新angular-cli.json使用端口2017,而不是默认)到minikube使用Docker。 我已经创build了Docker镜像,我的Dockerfile如下: FROM node:6 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package*.json /usr/src/app/ RUN npm install COPY . /usr/src/app EXPOSE 2017 CMD ["npm", "start"] 注意:nom start将运行命令ng serve -H 0.0.0.0 Docker镜像被推送到gcloud的容器registry,并使用我的deployment.yaml我已经在minikube中创build了一个部署 apiVersion: apps/v1beta2 kind: Deployment metadata: name: my-strength-coach spec: replicas: 1 selector: matchLabels: app: my-strength-coach template: metadata: labels: app: my-strength-coach spec: containers: – name: my-strength-coach image: […]