# Building:
#   
#     docker build -t irfpy/aspera -f bin/Dockerfile .
#
# Running Jupyter:
#
#     docker run --rm -it -p <port>:8888 -v <path_to_data>:/Volumes/scidata/data -v <workdir>:/notebooks irfpy/aspera bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/notebooks --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
# # For example,
#
#     docker run --rm -it -p 8888:8888 -v /Volumes/scidata256/data:/Volumes/scidata/data -v $(pwd):/notebooks irfpy/aspera bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/notebooks --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
#
# And access to the notebook
#
#     http://127.0.0.1:<port>/?token=<token_shown_in_the_console>
#

FROM continuumio/anaconda3
MAINTAINER irfpy <irfpy@irf.se>

EXPOSE 8888
VOLUME /notebooks /Volumes/scidata/data

RUN /opt/conda/bin/conda update -n base conda -y
RUN /opt/conda/bin/conda install -c conda-forge spiceypy netcdf4
RUN /opt/conda/bin/pip install --no-index --find-links=https://irfpy.irf.se/sdist irfpy.util irfpy.planets irfpy.spice irfpy.aspera -U

RUN curl https://irfpy.irf.se/projects/aspera/irfpyrc_sample.txt -o /root/irfpy.rc

WORKDIR /notebooks
