# Use Anaconda as base container
FROM continuumio/anaconda3:latest

# Install Jupyter
RUN /opt/conda/bin/conda install jupyter -y --quiet

# Install fmipy
RUN /opt/conda/bin/conda install -c conda-forge fmpy -y --quiet

# Copy local files to the remote notebooks
RUN mkdir /opt/notebooks
COPY examples /opt/notebooks/examples
COPY fmus /opt/notebooks/fmus
COPY cosimlibrary /opt/notebooks/cosimlibrary

# Port
EXPOSE 8888

# Run Jupyter Notebook
CMD ["/opt/conda/bin/jupyter", "notebook", "--notebook-dir=/opt/notebooks", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]
