uvis installed and remains in the container- we don't care if dev dependencies remain
- we're happy to use
uv runto execute our command
To run:
docker build -f Dockerfile.single.uvrun -t uv-single-uvrun .
docker run --rm uv-single-uvrun- We don't want to include dev-dependencies
uv runeffectively runsuv syncbefore each, meaning we always need to include--no-devin any case whereuv runis used or we'll end up installing the packages in each container or syncing the environment each timeuv runis called.
To run:
docker build -f Dockerfile.single.python -t uv-single-python .
docker run --rm uv-single-python- We want to use a multi-stage build to keep the image size down
To run:
docker build . -f Dockerfile.multi.python -t uv-multi-python
docker run --rm uv-multi-python- Use alpine to keep the image size down even more
To run:
docker build . -f Dockerfile.multi.python.alpine -t uv-multi-python-alpine
docker run --rm uv-multi-python-alpineuv-single-uvrun 454MB
uv-single-python 267MB
uv-multi-python 240MB
uv-multi-python-alpine 168MB