FROM debian:9 LABEL maintainer "Marco De Donno " ################################################################################ # System update RUN apt update && \ apt full-upgrade -y && \ apt install -y curl RUN groupadd -r webnist && \ useradd -r -g webnist webnist ################################################################################ # Installation of Python and build tools RUN apt install -y git python python-pip RUN pip install --upgrade pip ################################################################################ # Installation of all dependencies COPY ./library /library RUN find /library -name 'requirements.txt' -exec pip install -r {} \; && \ rm -rf /root/.cache/* RUN find /library -maxdepth 1 -mindepth 1 > /usr/local/lib/python2.7/dist-packages/mdedonno.pth RUN chmod +x /library/WSQ/WSQ/NBIS/cwsq && \ chmod +x /library/WSQ/WSQ/NBIS/dwsq ################################################################################ # Add the API module COPY ./API /API RUN pip install -r /API/requirements.txt COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT /entrypoint.sh HEALTHCHECK --interval=15s --timeout=3s CMD curl --fail http://localhost:5000/ping || exit 1 USER webnist