DevOps QTips #4 - Efficiently build PHP Container Image

Опубликовано: 13 Март 2026
на канале: Mochamad Gufron
53
2

Repository result can be found here: https://github.com/mgufrone/symfony-a...

In this video, I'm gonna showcase how you can enhance and make the build process of PHP container image more efficiently. You can reduce the total duration of the image from 7 minutes to a mere 10 seconds. enjoy the video!

Looking forward to your feedback in the comment section and please subscribe!

0:07 initial Dockerfile
1:07 run docker build first time
1:24 try run composer only once
1:41 split base as separate container image
1:54 push base image
2:01 update steps image reference to base image
2:08 run docker build again
2:13 run docker build again without cache