Ubuntu上使用Repo2Docker

Repo2Docker(https://github.com/jupyter/repo2docker)是Jupyter(https://github.com/jupyter)的一个子项目,也是BinderHub(https://github.com/jupyterhub/binderhub)用于构建容器镜像的工具。python

在Ubuntu上安装和使用步骤:git

安装Miniconda,将缺省安装python3:github

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh

安装repo2docker:docker

pip install jupyter-repo2docker

下载一个支持repo2docker的github项目:服务器

git clone https://github.com/openthings/databook

而后开始构建:工具

jupyter-repo2docker ./databook

若是是使用root帐号(如云服务器中),使用下面的方法:debug

repo2docker --no-run --user-id 1001 --user-name crowdai --debug ./databook

最后,使用命令 docker images 查看构建的镜像。code

相关文章
相关标签/搜索