FROM python:3.10 WORKDIR /code COPY . /code # Get secret DB_URL and clone it as repo at buildtime RUN --mount=type=secret,id=DB_URL,mode=0444,required=true \ git clone $(cat /run/secrets/DB_URL) RUN pip install --no-cache-dir poetry RUN poetry config virtualenvs.create false \ && poetry install --no-dev RUN poetry run search CMD ["poetry", "run", "start"]