FROM docker.io/fedora:26

LABEL MAINTAINER Resolwe authors https://github.com/genialis/resolwe

# XXX: Remove this after Resolwe learns how to mount re-* tools into every container
COPY re-import.sh /re-import.sh
# XXX: Remove this after Resolwe learns how to mount re-* tools into every container
COPY curlprogress.py /usr/local/bin/


RUN pip3 install resolwe-runtime-utils && \
    # XXX: Remove this hack after obsoleting re-checkrc
    echo 're-checkrc() { _re-checkrc $? "$@"; }' >> ~/.bash_profile && \
    # XXX: Remove this hack after updating processes to no longer implicitly assume $NAME is set
    # when calling re-import.sh
    cat /re-import.sh >> ~/.bash_profile && \
    rm /re-import.sh && \
    # XXX: Remove this after Resolwe learns how to mount re-* tools into every container
    chmod +x /usr/local/bin/curlprogress.py
