Laravel 101: A New Flavor for Ravel!

Ezra Lazuardy
Level Up Coding
Published in
4 min readJul 16, 2023

--

A sweet, elegant Alpine variant is finally stable for your pipeline.

Photo by Jamie Albright on Unsplash

It’s been 6 months since I release Ravel, a battery-included CI/CD Environment for Laravel.

Things have changed since then. Many updates from the OSS community have made a huge contribution to several libraries and images, making debugging and optimizing much easier.

This particular project, Ravel, unexpectedly really help me in developing CI/CD pipelines for many projects that I develop.

I don’t know why but randomly now I decided to develop and optimize this project again. Yeah, a new idea is sparking.

Why don’t Ravel use Alpine as it’s image base?

A simple-yet-hard-to-answer type of question.

Image by Alpine on Docker Hub

Alpine weighs ridiculously small, compared to the most stable image out there. While I write this post, the latest version of Alpine is sized an average of 3 MB, while Ubuntu is sized an average of 25 MB.

Ubuntu size is more than 8x the size of Alpine.

The reason Alpine Linux is much smaller than Ubuntu is because it has very limited features. Ubuntu is much more stable and production-ready if applied to the system workload. Alpine still needs to be manually tweaked and configured so that it can run stable and smoothly.

Not to mention that applications and libraries in Alpine are not as many as Ubuntu has.

It’s working

Migrating Ravel’s base image to Alpine is a challenge, especially for me.

Build History by Ezra Lazuardy on Depot

After days of configuring, build test, and CI/CD workflow test, finally, the Alpine image is working perfectly for the Laravel project. Yay!

I successfully cut the size of Ravel from an average of 310 MB,

Ravel 8.2 Image by Ezra Lazuardy on Docker Hub

To only average 140 MB. It’s less than half of its size!

Ravel 8.2 Alpine Image by Ezra Lazuardy on Docker Hub

And magically, it’s achieved with the same features, libraries, versions, and functionalities. But with a much lighter size and better performance. How cool is that?

As you can see in the image above, I also built a multi-architecture image so that you can use it on an Intel-based machine or ARM-based machine.

The smaller the better

Depending on the usage, a small image means a better image.

Photo by Fernando Lavin on Unsplash

How so?

  • It uses the library efficiently, with minimum bloatware
  • Minimum bandwidth is used to pull the image
  • Saves build time on your CI/CD Pipeline
  • Better performance peak

Based on my personal experience, using the Alpine flavor saves me up to 2 minutes for the CI/CD pipeline build time.

Build Process by Ezra Lazuardy on BitBucket Pipelines

To try this performance, you just need to use Ravel in your CI/CD pipeline.

docker pull ezralazuardy/ravel:8.2-alpine

Ravel is now OSS!

Last but not least, I decided to make this project an Open Source Project.

Ravel by Ezra Lazuardy on GitHub

Ravel is now on GitHub under MIT License.

From now on you can contribute or even open an issue if there’s something wrong with it. Cheers!

Level Up Coding

Thanks for being a part of our community! Before you go:

🔔 Follow us: Twitter | LinkedIn | Newsletter

🚀👉 Join the Level Up talent collective and find an amazing job

--

--

“An idiot admires complexity. A genius admires simplicity.” — Terry A Davis