Smaller Alpine based image for Laravel Sail runtimes
neo/little-sail is a Laravel package for smaller alpine based image for laravel sail runtimes.
It currently has 37 GitHub stars and 9.082 downloads on Packagist (latest version v1.0.6).
Install it with composer require neo/little-sail.
Discover more Laravel packages by neo
or browse all Laravel packages to compare alternatives.
Last updated
Little Sail is just an extension for Laravel Sail. Currently, the Laravel Sail PHP image is over ~666mb. This is mostly because it uses the Ubuntu image. For those who would prefer smaller images, I created this extension.
The image generated by this package is around ~284mb. Thats around a 57% decrease in size.
It is a similar image with the same extensions but built using a Linux Alpine base.
To install, use composer to pull the package:
composer require neo/little-sail --dev
Next, update your projects docker-compose.yml file as follows:
version: '3'
services:
api:
build:
context: ./vendor/laravel/sail/runtimes/8.2 # Replace this
context: ./vendor/neo/little-sail/runtimes/8.2-alpine # With this (or 8.0 or 7.4 if thats what you want)
# ...
If you already had Laravel Sail running, you will have to stop the containers, and then delete the sail-8.0/app image and then run sail up again (you can also just change the image name in your docker-compose.yml file).
You can use the nifty command included with the package:
$ ./vendor/bin/dock
Then when the command is done running, you can bring Laravel Sail up again.
If you want, you can update the Little Sail runtimes to work specifically for you. Run:
$ php artisan little-sail:publish # or sail artisan little-sail:publish