Fixes Dockerfile to use uv#204
Fixes Dockerfile to use uv#204matthewdeanmartin wants to merge 3 commits intoLibraryOfCongress:masterfrom
Conversation
Dockerfile
Outdated
| COPY test-data /bagit/test-data/ | ||
| CMD [ "python", "setup.py", "test" ] | ||
| COPY utils/ /bagit/ | ||
| RUN pip install --upgrade pip && pip install uv && uv sync --all-extras |
There was a problem hiding this comment.
I think this would improve caching and also has the ever popular version pin:
| RUN pip install --upgrade pip && pip install uv && uv sync --all-extras | |
| COPY --from=ghcr.io/astral-sh/uv:0.11.5-python3.14-trixie /uv /uvx /usr/bin/ | |
| ENV UV_LINK_MODE=copy | |
| RUN --mount=type=cache,target=/root/.cache/uv uv sync --all-extras |
(at this point, however, it'd also be reasonable ask whether the base image should simply be FROM ghcr.io/astral-sh/uv:0.11.5-python3.14-trixie)
If we wanted to stay with pip—which has a certain appeal for avoiding various political debates in the community—I would do this:
| RUN pip install --upgrade pip && pip install uv && uv sync --all-extras | |
| RUN pip install ---upgrade --uploaded-prior-to=$(date -Iseconds --date="1 week ago") pip |
|
It was easier to get it to work with Also added dos2linux because git corrupts the line feeds. I figure if someone is running on linux they probably are running their tests on bare metal, it's the windows people that needs the docker file. |
|



Dockerfile had setup.py syntax. Now matches readme.rst
This now works as promised
docker build -t bagit:latest . && docker run -it bagit:latest