Skip to content
Dockerfile 1.45 KiB
Newer Older
LABEL maintainer "Marco De Donno <Marco.DeDonno@unil.ch>"

################################################################################
Marco De Donno's avatar
Marco De Donno committed
#	Installation of Python and other tooling
RUN apt-get update && \
    apt-get install -y curl git python python-pip && \
Marco De Donno's avatar
Marco De Donno committed
    rm -rf /var/lib/apt/lists/*

################################################################################
Marco De Donno's avatar
Marco De Donno committed
#	User configuration
Marco De Donno's avatar
Marco De Donno committed
RUN adduser --shell /bin/true --no-create-home --uid 999 --disabled-password --disabled-login icnml && \
    sed -i -r "/^(icnml|root)/!d" /etc/group /etc/passwd && \
    sed -i -r 's#^(.*):[^:]*$#\1:/sbin/nologin#' /etc/passwd

################################################################################
#	Installation of Marco De Donno's libraries and depencencies

COPY ./library /library
RUN find /library -name 'requirements.txt' -exec pip install -r {} \;
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

RUN python /library/MDmisc/doctester.py
RUN python /library/NIST/doctester.py

################################################################################
#	Add the web module

COPY ./app/requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt

COPY ./keys /keys

COPY ./app /app
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /app
ENTRYPOINT /entrypoint.sh

USER icnml