Oct 19, 2018

Docker for PHP Developers and Laradock

This week I started Paul Redmond's fantastic Docker For PHP Developers course.

The main video series (and corresponding ebook) focus on getting started using Docker, using various PHP frameworks as the example projects implemented using Docker.

I've tried getting into Docker through other educational products on multiple occasions in the past two years, but this is the first time I actually got an app up and running in my browser.

The course helps you set up containers for the app, MySQL, Redis, and everything else you need to support your app.

I love results that this course has delivered!

After building my Docker intuition with this course, I started using Laradock (a pre-assembled bundle of docker services) as my local environment instead of Laravel's first-party Homestead.

Launching a project on docker when I fire up my machine takes seconds, instead of minutes as it did with Homestead because it doesn't need to build a whole virtual machine. It's easier to get inside the app container to do things like migrating the database. That's not even required though, because Docker supports sending commands into a container from the host machine. One of my tasks is to create some bash aliases that send commands into docker containers to migrate the database and other things that need to be done at the app container level.

I also joyfully discovered that Laradock supports custom domain names, which aren't covered in Paul Redmond's course. Meaning now I can locally use http://project-name.test instead of

My next steps are to get local SSH running, which is supported by Laradock via Caddy, and a scheduler set up which is requred so that scheduled commands can be started by Laravel.

I am still using Laravel Forge which is a fantastic production server management SaaS by Laravel creator Taylor Otwell but I would like to eventually deploy to production using a containerized approach.

The past few months I've been struggling to find a way to reach the next level with my programming and I feel branching out into more a sophisticated DevOps setup is one way to achieve this goal.

My thanks go out to Paul Redmond for this great course, I have no affiliation with him but recommend you pick up a copy if this has piqued your interest.

Docker For PHP Developers course

Please Login or Register to Comment