Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何在Docker中运行Iojs?_Node.js_Docker_Dockerfile_Iojs - Fatal编程技术网

Node.js 如何在Docker中运行Iojs?

Node.js 如何在Docker中运行Iojs?,node.js,docker,dockerfile,iojs,Node.js,Docker,Dockerfile,Iojs,我有以下Dockerfile: FROM ubuntu:14.10 ENV HOMEDIR /usr/share/iojs RUN apt-get update && \ apt-get install software-properties-common python-software-properties -qq -y && \ apt-get upgrade -y && \ apt-get install -qq

我有以下Dockerfile:

FROM ubuntu:14.10

ENV HOMEDIR /usr/share/iojs

RUN apt-get update && \
    apt-get install software-properties-common python-software-properties -qq -y && \
    apt-get upgrade -y && \
    apt-get install -qq -y supervisor npm

RUN cd ${HOMEDIR} && \
    wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash && \
    . ~/.nvm/nvm.sh && \
    nvm install iojs

RUN supervisorctl restart iojs

EXPOSE 80

CMD ["/usr/bin/supervisord", "-n"]
FROM iojs
# ...
/etc/supervisor/conf.d/supervisord.conf

[supervisord]
autostart=true
autorestart=true
nodaemon=true

[program:iojs]
directory=/usr/share/iojs
command=/usr/bin/iojs index.js
autostart=true
autorestart=true

注意:脚本位于
/usr/share/iojs

中。这是一种不同的方法,并不是说您的方法不起作用。为什么不从dockerhub中基于Debian 8的iojs图像开始呢

Dockerfile:

FROM ubuntu:14.10

ENV HOMEDIR /usr/share/iojs

RUN apt-get update && \
    apt-get install software-properties-common python-software-properties -qq -y && \
    apt-get upgrade -y && \
    apt-get install -qq -y supervisor npm

RUN cd ${HOMEDIR} && \
    wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash && \
    . ~/.nvm/nvm.sh && \
    nvm install iojs

RUN supervisorctl restart iojs

EXPOSE 80

CMD ["/usr/bin/supervisord", "-n"]
FROM iojs
# ...
监督形态:

[supervisord]
autostart=true
autorestart=true
nodaemon=true

[program:iojs]
directory=/usr/share/iojs
command=/usr/local/bin/iojs index.js
autostart=true
autorestart=true

这是一种不同的方法,并不是说你的方法不起作用。为什么不从dockerhub中基于Debian 8的iojs图像开始呢

Dockerfile:

FROM ubuntu:14.10

ENV HOMEDIR /usr/share/iojs

RUN apt-get update && \
    apt-get install software-properties-common python-software-properties -qq -y && \
    apt-get upgrade -y && \
    apt-get install -qq -y supervisor npm

RUN cd ${HOMEDIR} && \
    wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash && \
    . ~/.nvm/nvm.sh && \
    nvm install iojs

RUN supervisorctl restart iojs

EXPOSE 80

CMD ["/usr/bin/supervisord", "-n"]
FROM iojs
# ...
监督形态:

[supervisord]
autostart=true
autorestart=true
nodaemon=true

[program:iojs]
directory=/usr/share/iojs
command=/usr/local/bin/iojs index.js
autostart=true
autorestart=true

呃,那么发生了什么或没有发生什么?呃,那么发生了什么或没有发生什么?哈,从没想过在Docker hub寻找iojs回购协议。让我试试这个…哈,从没想过在Docker hub寻找iojs回购。让我试试这个。。。