mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-13 17:20:38 +08:00
Use pip install
with --no-cache-dir
in Dockerfiles
This will help minimize the Docker image size, as below: ``` REPOSITORY TAG IMAGE ID CREATED SIZE pr-agent after caed11a1ed9c 2 hours ago 1.48GB pr-agent before d6f12eb987b8 3 hours ago 1.59GB ```
This commit is contained in:
@ -4,7 +4,7 @@ WORKDIR /app
|
||||
ADD pyproject.toml .
|
||||
ADD requirements.txt .
|
||||
ADD docs docs
|
||||
RUN pip install . && rm pyproject.toml requirements.txt
|
||||
RUN pip install --no-cache-dir . && rm pyproject.toml requirements.txt
|
||||
ENV PYTHONPATH=/app
|
||||
|
||||
FROM base AS github_app
|
||||
@ -33,7 +33,7 @@ CMD ["python", "pr_agent/servers/azuredevops_server_webhook.py"]
|
||||
|
||||
FROM base AS test
|
||||
ADD requirements-dev.txt .
|
||||
RUN pip install -r requirements-dev.txt && rm requirements-dev.txt
|
||||
RUN pip install --no-cache-dir -r requirements-dev.txt && rm requirements-dev.txt
|
||||
ADD pr_agent pr_agent
|
||||
ADD tests tests
|
||||
|
||||
|
Reference in New Issue
Block a user