Docker is an open platform for developers and system administrators to build, ship, and rundistributed applications, whether on laptops, data center virtual machines, or the cloud. Anaconda provides both Anaconda Distribution and Miniconda Docker images.
Read the official Docker documentation and specifically the information related to Docker images.
Begin by browsing the available Anaconda images on our Docker profile.
To obtain a fully working Miniconda image:
-
In a terminal window, display a list of available images by running the following command:
docker search continuumio
-
Pull the desired image:
docker pull continuumio/miniconda3
-
Create a container using the image:
docker run -t -i continuumio/miniconda3 /bin/bash
This gives you direct access to the container where the conda tool is already available.
-
Test the container:
You now have a fully working Anaconda image.
To install and launch the Jupyter Notebook, execute the following command all on one line from
the host machine:
docker run -i -t -p 8888:8888 continuumio/miniconda3 /bin/bash \
-c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir \
/opt/notebooks && /opt/conda/bin/jupyter notebook \
--notebook-dir=/opt/notebooks --ip='*' --port=8888 \
--no-browser --allow-root"
This command is formatted for readability. If your shell supports line continuation (for example, bash, zsh), you can run it as shown. Otherwise, remove the backslashes (\
) and combine it into a single line.
To access the Jupyter notebook, copy and paste the server URL from the terminal output. It will look something like http://localhost:8888/tree?token=<TOKEN_VALUE>
or, if you are using a Docker Machine VM, http://<DOCKER-MACHINE-IP>:8888/tree?token=<TOKEN_VALUE>
.