粘结剂项目看起来很有希望。它通过构建可执行容器来帮助在github存储库中执行笔记本。我试图使用以下Dockerfile在绑定程序中构建一个可执行容器,该容器具有Perl 6和Python3内核:
FROM sumdoc/perl-6
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
RUN apt-get update \
&& apt-get install -y build-essential \
git wget libzmq3-dev ca-certificates python3-pip \
&& rm -rf /var/lib/apt/lists/* && pip3 install jupyter notebook --no-cache-dir \
&& zef -v install https://github.com/bduggan/p6-jupyter-kernel.git --force-test \
&& jupyter-kernel.p6 --generate-config
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
EXPOSE 8888
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]绑定程序在生成容器后启动此窗口:

在尝试运行Perl 6或Python 3笔记本时,我得到了以下错误:

我读过这个关于粘合剂的文件,但没能成功。
我错过了什么?如有任何解释方面的帮助,将不胜感激。
发布于 2018-01-04 07:34:49
通过这个Dockerfile之后,我解决了这个问题。
我甚至写了一个关于在粘合剂在这里中使用Perl 6笔记本的博客。
我所缺少的是在我的Dockerfile中的WORKDIR $HOME之后添加USER ${NB_USER},如下所示:
FROM sumankhanal/perl-6
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
RUN apt-get update \
&& apt-get install -y build-essential \
git wget libzmq3-dev ca-certificates python3-pip \
&& rm -rf /var/lib/apt/lists/* && pip3 install jupyter notebook --no-cache-dir \
&& zef -v install https://github.com/bduggan/p6-jupyter-kernel.git --force-test \
&& jupyter-kernel.p6 --generate-config
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
WORKDIR ${HOME}
EXPOSE 8888
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]https://stackoverflow.com/questions/48079802
复制相似问题