Skip to content

Can't use uv docker image as a command-line tool #8635

@mjpieters

Description

@mjpieters

Given that the documentation suggests that you can use the docker container as a command-line tool I found it very surprising that you can't, in fact, use uv in this manner:

$ uv lock  # ensure there is an up-to-date lockfile
docker run --rm \
      --mount type=bind,source="$(pwd)",destination=/app --mount destination=/app/.venv \         
      ghcr.io/astral-sh/uv:latest \
           --directory /app -vv tree
    0.000473s DEBUG uv uv 0.4.27
    0.001380s DEBUG uv_workspace::workspace Found workspace root: `/app`
    0.001392s DEBUG uv_workspace::workspace Adding current workspace member: `/app`
    0.001800s DEBUG uv_python::discovery Searching for Python >=3.12 in managed installations or system path
    0.001841s DEBUG uv_python::discovery Searching for managed installations at `/.local/share/uv/python`
error: Could not read ELF interpreter from any of the following paths: /bin/sh, /usr/bin/env, /bin/dash, /bin/ls

The tree command should not require a Python interpreter (see #8634), but the ELF error here is especially confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions