【发布时间】:2017-11-12 16:51:27
【问题描述】:
我需要使用一个带有nginx和nodejs的容器,所以我拿了nginx容器并安装了节点:
FROM nginx
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /usr/src/app
VOLUME /usr/src/app
RUN apt-get update && \
apt-get install -y apt-utils && \
apt-get install -y --no-install-recommends curl sudo wget nano && \
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs git build-essential && \
whereis npm && \
npm install grunt grunt-cli bower -g && \
whereis 没有返回任何东西 npm: 和 npm install... 使构建过程崩溃。所以我的错误在哪里,有错误还是什么?顺便说一句,我正在使用最新的 docker-compose 和 Docker 版本 17.03.1-ce,构建 c6d412e
更新1:不是this question的骗子,我只用了一条RUN线
【问题讨论】:
-
@NazariiBardiuk 这不是一个重复,因为我只使用一个 RUN,这个 dockerfile 上个月也可以工作
标签: node.js nginx docker npm docker-compose