Customizing Laravel Sail

[00:00] To customize Sail, first you need to make sure it's up and running. So do sail up -d and then you need to publish all of its configuration files. You can do that by running the following command: sail artisan sail:publish. This will publish the configuration files for both the PHP 7 version and the PHP 8 one.

[00:30] You can then go to docker, 8.0, open the Dockerfile and make whatever changes you want to it.

[00:39] Let's say we need to use ffmpeg, which is a command line program used to process video and audio files. I can go right here after apt-get install -y and say ffmpeg and save. Next we need to go back to the terminal and stop sail using sail down and rebuild the images using the new configuration file. And we can do that with sail build --no-cache. And to test our ffmpeg installation we open a new shell using sail shell and run ffmpeg, and here it is.

Create an account to view the code snippets of this lesson.