Best practices for using Python & uv inside Docker

Posted by ashishb_net@reddit | Python | View on Reddit | 111 comments

Getting uv right inside Docker is a bit tricky and even their official recommendations are not optimal.

It is better to use a two-step build process to eliminate uv from the final image size.

A two-step build process not only saves disk space but also reduces attack surface against security vulerabilities