3 ms·
You're right that it's not trivial if you're starting from scratch but, in theory, you only need to get it right once. Even if you did need to move to a differe
by ethagnawl 3y ago
You're right that it's not trivial if you're starting from scratch but, in theory, you only need to get it right once. Even if you did need to move to a different strategy in the future because pip stopped being included in your container's distro or something, that's a single point of failure and not something that needs to be sorted out on every dev/prod machine.
To move up a level of abstraction, though, the official Python image pretty much does The Right Thing by default (copy requirements.txt, pip install, execute some command, etc.). Of course that isn't going to work for every scenario but it's a good place to start.