Skip to content

uv self update command cannot be used inside the devcontainer #54

@gbaian10

Description

@gbaian10

I recently started learning to use devcontainer, and this repo has taught me a lot.


The UV built and copied into the container in multiple stages cannot execute the uv self update command.

If continue with the current approach, rebuilding the entire devcontainer might be the only way to upgrade the UV version?

I ultimately chose to use onCreateCommand to install UV, so I can use uv self update to upgrade the UV version.

"onCreateCommand": "curl -LsSf https://astral.sh/uv/install.sh | sh",
"updateContentCommand": "uv self update",
"postCreateCommand": "uv sync --frozen",

Also, I'm not quite sure about the trigger timing for updateContentCommand, so I'm not sure if writing it this way is correct.


I wonder if you think the approach mentioned above is appropriate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions