Add git in Dockerfile
This commit is contained in:
@ -2,6 +2,9 @@
|
|||||||
FROM python:3.13-slim
|
FROM python:3.13-slim
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
|
# Install git
|
||||||
|
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Change the working directory to the `app` directory
|
# Change the working directory to the `app` directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@ -10,6 +13,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||||
uv sync --no-install-project
|
uv sync --no-install-project
|
||||||
|
|
||||||
|
# Uninstall git to reduce image size
|
||||||
|
RUN apt-get purge -y --auto-remove git
|
||||||
|
|
||||||
# Copy the application files
|
# Copy the application files
|
||||||
ADD main.py misc.py /app/
|
ADD main.py misc.py /app/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user