Node.js 如何在Docker中运行Iojs?
我有以下Dockerfile: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
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回购。让我试试这个。。。