I am trying to build a Dockerfile while keeping its size minimal, it contains some python packages that have cython code which needs to be compiled. From my research I understand that pip will compile all code for me if I specify '--compile' flag, moreover '--global-option' will let me provide flags for the cython compiler. I do have a few packages to install so I was wondering how I can provide flags like '-Os' or '-g1' without having to specify them with each install. This brings me to pip.ini seems like a reasonable place to specify that kind of information but I can't find much documentation on waht belongs in it or how would I specify a list of parameters like the compiler flags that I mentioned.
I'm not asking for anyone to do all the legwork for me here happy to just accept links I failed to find.