File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Dockerfile
22
3-
43FROM python:3.11-slim as builder
54
6- RUN pip install poetry
5+ ENV POETRY_HOME="/opt/poetry"
6+ RUN python3 -m venv $POETRY_HOME
7+ ENV PATH="$POETRY_HOME/bin:$PATH"
8+ RUN pip install --upgrade pip && pip install poetry
9+
10+
711WORKDIR /app
8- COPY pyproject.toml poetry.lock ./
912
10- RUN poetry install --without dev --no-interaction --no-ansi
13+ COPY poetry.lock pyproject.toml ./
14+
15+ RUN poetry install --no-root --no-dev
1116
1217FROM python:3.11-slim
1318
1419WORKDIR /app
1520
16- COPY --from=builder /root/.cache/pypoetry/virtualenvs/ /root/.cache/pypoetry/virtualenvs/
17-
18- COPY --from=builder /app/pyproject.toml /app/
21+ COPY --from=builder /app/.venv /app/.venv
1922
2023COPY src/ /app/src/
24+ COPY pyproject.toml .
25+
26+ ENV PATH="/app/.venv/bin:$PATH"
2127
22- RUN poetry config virtualenvs.in-project false --local \
23- && poetry config virtualenvs.path /root/.cache/pypoetry/virtualenvs
28+ RUN pip install .
2429
25- ENTRYPOINT ["poetry" , "run" , " code-review-agent" ]
30+ ENTRYPOINT ["code-review-agent" ]
2631CMD ["--help" ]
You can’t perform that action at this time.
0 commit comments