Open ykshatroff opened 4 years ago
I think the better way is to just have another image that builds on this one. I think this situation is the same issue I had, and that lead me to build docker-alscipy. Is this the case, correct me if I'm wrong.
I feel that the template approach would lead to the same problem, which is you would have to build them anyways. The ARG argument might be solved with the slim
tag but that also requires the image to be built, and don't change that.
Any other ideas?
This is not a bug on its own, but rather a question of efficiency.
If I add some python library that requires binary objects to be built or run (examples:
lxml
requireslibxml2
andlibxslt
, postgrespsycopg2
requireslibpq
to run andpostgresql-dev
to build, etc) then I would have to essentially repeat all the installation and removal rituals in my descendant image. At the same time it would be more efficient to just have a custom dockerfile with the cleanup done once in the last stage of the build, and just docker-squash the resulting image.Currently I see several ways out of this dilemma:
There might be other ways of doing it, any ideas/suggestions?