FROM debian:buster

# DL3008 Pin versions in apt get install
# hadolint ignore=DL3008
RUN set -x && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
      python3 \
      python3-pip \
      python3-setuptools \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

WORKDIR /app
COPY . /app

RUN python3 setup.py build && \
    python3 setup.py install && \
    adduser --disabled-password --gecos '' gitlabracadabra

USER gitlabracadabra

ENTRYPOINT ["gitlabracadabra"]
