3 ms·
Yeah, containers don't fully solve this problem. We still need a generated lock file with every top level dependency and sub-dependencies locked down to their
by nickjj 3y ago
Yeah, containers don't fully solve this problem.
We still need a generated lock file with every top level dependency and sub-dependencies locked down to their most precise version commit to version control so that when you build your image today or in 6 months you end up with the same result.
Using pip to freeze your dependencies and writing a tiny shell script to generate a lock file at build time is better than nothing to solve this problem with nothing more than pip. It's what I do in https://github.com/nickjj/docker-flask-example https://github.com/nickjj/docker-flask-example and https://github.com/nickjj/docker-django-example https://github.com/nickjj/docker-django-example. It's not perfect but it solves 80% with minimal complexity.