Open fyliu opened 11 months ago
I'm picking up from where @alexlaw528 left off. This change will make the image smaller and reduce the download required to build the image.
I'm able to reduce the image size to 3xxMB by switching to alpine. However, the erd script doesn't work anymore. It generates a junk image.
Considering abandoning image generation for erd, and maybe do it separately on the host or use an online service. Without the erd image generation helpers, the image is 138MB, which is 1/10 the size of the debian-based image.
The bad png image was caused by the Roboto font being specified in the .dot
file but not being found in the alpine system. It generated the png correctly after I installed the font.
The problem I'm having is that there's not a good way to automate downloading the font when building the image. I manually downloaded and installed it in the container for testing. Maybe the solution is to choose a font that already exists or is easy to install in alpine.
I left a message in the django-extensions mailing list but there's no response. I can only assume that Roboto is the designated default font, so I'm checking it into git and installing it into the image at build time so that the erd.png generation can work as before.
The final image size is 203MB on my machine.
I made a PR.
A couple things happened in the PR thread. We'll need to add these tasks
Overview
The current PD docker image is 1.3GB. We should switch to alpine so that we can reduce the image size.
Action Items
Resources/Instructions