簡體   English   中英

Gcloud MeanJS通過Docker安裝失敗

[英]Gcloud meanjs build failing via docker install

我正在嘗試使用gcloud app deploy在Google Cloud App Engine上部署以下容器,這是meanjs.org原始圖片。 它使用了一個dockerfile,我是docker的新手,我想即時學習它,因此,如果有人可以提供幫助,那就太好了,謝謝。 看來通過dockerfile的節點安裝失敗,我已經檢查了github上的節點文檔,並且語法上與現有dockerfile中的內容沒有任何變化。 今天早上,我將嘗試在本地工作站上重新創建,並將在不久后更新此查詢。 錯誤如下。. 第一個docker錯誤 第二個錯誤 構建失敗錯誤 docker文件..

 # Build: # docker build -t meanjs/mean . # # Run: # docker run -it meanjs/mean # # Compose: # docker-compose up -d FROM ubuntu:latest MAINTAINER MEAN.JS # 80 = HTTP, 443 = HTTPS, 3000 = MEAN.JS server, 35729 = livereload, 8080 = node-inspector EXPOSE 80 443 3000 35729 8080 # Set development environment as default ENV NODE_ENV development # Install Utilities RUN apt-get update -q \\ && apt-get install -yqq \\ curl \\ git \\ ssh \\ gcc \\ make \\ build-essential \\ libkrb5-dev \\ sudo \\ apt-utils \\ && apt-get clean \\ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Install nodejs RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - RUN sudo apt-get install -yq nodejs \\ && apt-get clean \\ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Install MEAN.JS Prerequisites RUN npm install --quiet -g gulp bower yo mocha karma-cli pm2 && npm cache clean RUN mkdir -p /opt/mean.js/public/lib WORKDIR /opt/mean.js # Copies the local package.json file to the container # and utilities docker container cache to not needing to rebuild # and install node_modules/ everytime we build the docker, but only # when the local package.json file changes. # Install npm packages COPY package.json /opt/mean.js/package.json RUN npm install --quiet && npm cache clean # Install bower packages COPY bower.json /opt/mean.js/bower.json COPY .bowerrc /opt/mean.js/.bowerrc RUN bower install --quiet --allow-root --config.interactive=false COPY . /opt/mean.js # Run MEAN.JS server CMD npm install && npm start 

好吧,因此在嘗試在Windows上安裝docker失敗很多之后,我回到了dockerfile嘗試在此處確定核心問題。 幸運的是,我找到了以下解決方案。

NodeJS試圖在Ubuntu上安裝。 在應用程序根目錄的dockerfile中,Ubuntu版本配置為:

FROM ubuntu:latest

只需將其更改為:

FROM ubuntu:14.04

我不確定這是否是用於構建的最佳版本,但它似乎已成功運行。 請隨時修改/推薦替代解決方案。 我是Docker的新手,所以請客氣。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM