A Dockerfile that produces a Docker Image for anaconda3 on centos7.
The master branch currently hosts centos7.3.1611 and anaconda3.4.4.0.
Different versions of anaconda are located at the github repo branches.
To create the image xuhui546/anaconda-centos, execute the following command on the anaconda-centos folder:
$ docker build -t xuhui546/anaconda-centos .
To run the image and bind to host port 8888:
$ docker run -d -p 8888:8888 xuhui546/anaconda-centos
To get the password, check the logs of the container by running:
docker logs <CONTAINER_ID>
You will see an output like the following:
============================================================
Notebook config path: /root/.ipython/profile_hehe/
Notebook certificate path: /root/.jupyter/
Notebook password: iEum7cCP
Notebook port: 8888
============================================================
If you want to preset arguments instead of a default ones, you can set the following variables:
optional arguments:
-e "JUPYTER_PORT=88" set jupyter server listen port(default:8888)
-e "JUPYTER_PASS=mypass" set jupyter login password(default:random)
-e "JUPYTER_WORKDIR=/root" set jupyter workdir(default:/)
On this example we will preset our custom password:
$ docker run -d -p 8889:88 -e "JUPYTER_PORT=88" \
-e "JUPYTER_PASS=mypass" -e "JUPYTER_WORKDIR=/root" xuhui546/anaconda-centos
Copyright (c) 2016 XuHui.