FROM python:latest LABEL maintainer="Amritanshu " RUN git clone --single-branch --depth 1 --branch latest https://git.tanshu.com/tanshu/barker.git /repo RUN mkdir /app && mv /repo/barker/* /app WORKDIR /app # Install Poetry RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \ cd /usr/local/bin && \ ln -s /opt/poetry/bin/poetry && \ poetry config virtualenvs.create false # Allow installing dev dependencies to run tests ARG INSTALL_DEV=false RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi" ENV C_FORCE_ROOT=1 ENV PYTHONPATH=/app RUN mv /app/worker-start.sh /usr/local/bin/ \ && chmod 777 /usr/local/bin/worker-start.sh \ && ln -s /usr/local/bin/worker-start.sh / CMD ["bash", "worker-start.sh"]