# The dockerfile begins with defining an image FROM which the build process starts.
# Since our module is based on python 3.0, we use python:3 as our base image.
# You can find trusted docker contains at https://store.docker.com/.
# WORKDIR changes the active directory of the container to a specific location.
# In case you need to run commands from or in a particular location.
# Here we are copying all our files to the root directory of the container
COPY ./module_specification.json .
COPY ./requirements.txt .
# Include this, if you need Matplotlib to generate the output image
#RUN mkdir -p /root/.config/matplotlib
#RUN echo "backend : Agg" > /root/.config/matplotlib/matplotlibrc
RUN pip install -r requirements.txt
# CMD command is similar to RUN. However unlike RUN, CMD is not executed during build, but when a container is instantiated.
# Therefore, it should be considered as an initial, default command that gets executed when container starts.
# In this example, we would like to run our python command when the container starts.
ENTRYPOINT [ "python", "./apeer_main.py" ]