首页 > 解决方案 > 可执行文件不在 docker 容器中 jupyter notebook 的路径中

问题描述

我的 Dockerfile 看起来像这样。

FROM python:3
RUN apt-get update && apt-get install -y python3-pip
COPY requirements.txt .
RUN pip install -r requirements.txt

#install jupyter
RUN useradd -ms /bin/bash demo

#change to new user
USER demo

#set the container working directory to user home folder
WORKDIR /home/demo


#start the jupyter notebook
ENTRYPOINT ["jupyter","notebook", "--ip=0.0.0.0"]`

它成功地创建了一个图像。但是在运行时我遇到了这样的错误。

container_linux.go:349: starting container process caused "exec: \"jupyter\": executable file not found in $PATH": unknown.

任何见解如何解决这个问题

标签: docker

解决方案


您使用 python3 作为基础映像,默认情况下不安装 jupyter。你应该看看 jupyter 图像:Jupyter Docker Image


推荐阅读