3 ms·
If you think having something like pipenv or gcc in your image is a "perfect way" of doing things, you're sorely mistaken. Neither of those are needed. Use mul
by dastx 7y ago
If you think having something like pipenv or gcc in your image is a "perfect way" of doing things, you're sorely mistaken.
Neither of those are needed. Use multi stage docker files to avoid such unnecessary and potentially dangerous dependencies.
In addition, why do you need to disable byte code writing? You're unnecessarily disabling optimizations done by python.
- brendanator 7y agoMulti stage builds do indeed seem much better, thanks Regarding writing bytecode - this slows down the first load of a file, in exchange for speeding up subsequent loads of a file. It has no effect on runtime speed. Given that python code is only loaded once when a Docker image is run, it is better to disable this.