Whenever I publish something about my Python Docker workflows, I invariably get challenged about whether it makes sense to use virtual environments in Docker containers. As always, it’s a trade-off, and I err on the side of standards and predictability. I am keenly aware that – especially with single-purpose Python containers like python:.* – it’s popular to achieve multi-stage builds by either in
