FROM gitlab/gitlab-runner:latest

RUN apt-get update -y && \
    apt-get install -y -qq software-properties-common python-software-properties && \
    add-apt-repository -y ppa:jonathonf/python-3.6 && \
    apt-get update -y -qq && \
    apt-get install -y -qq python3.6 git curl libzmq-dev && \
    rm -rf /var/lib/apt/lists/* && \
    apt-get clean && \
    update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1 && \
    update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 && \
    update-alternatives --config python && \
    curl -fsSL get.docker.com | sh && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN curl https://bootstrap.pypa.io/get-pip.py | python3

# FIXME FIXME FIXME FIXME FIXME FIXME VERY SOON
RUN usermod -aG root gitlab-runner

# install renku
ENV LANG C.UTF-8
COPY . /code/renku
WORKDIR /code/renku
RUN pip3 install --no-cache -e .[all]
