Splitting a Python Dockerfile into Build and Runtime Stages
· 8 min read
I shipped a Flask backend for a quiz platform. The first time CI tried to push the production image to GitHub Container Registry, it died midway:
#15 pushing layer dc355e6e88a5 145.61MB / 673.11MB 9.0s done
#15 ERROR: unknown blob
The image was around 700 MB. One layer on its own was 673 MB. Every Pod cold-start was pulling that off the registry, and pushes kept timing out because the single big layer took too long to upload in one shot.
