Docker#

Docker is an open platform for developers and system administrators to build, ship, and run distributed applications, whether on laptops, data center virtual machines, or the cloud. Anaconda, Inc. provides Anaconda 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 Anaconda image:

  1. In a terminal window, run this command to display a list of available images:

    docker search continuumio
    
  2. Pull the desired image:

    docker pull continuumio/miniconda3
    
  3. 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.

  4. Test the container:

    conda info
    

    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"

Tip

This command is formatted for readability. If your shell supports line continuation (e.g., bash, zsh), you can run it as shown. Otherwise, remove the backslashes (\) and combine it into a single line.

To access the Jupyter notebook open http://localhost:8888 in your browser, or open http://<DOCKER-MACHINE-IP>:8888 if you are using a Docker Machine VM.

Note

Replace <DOCKER-MACHINE-IP> with your Docker Machine VM IP address.