---
title: No more Docker for PHP
url: "https://aaronfrancis.com/videos/no-more-docker-for-php"
path: "/videos/no-more-docker-for-php"
type: video
author: Aaron Francis
published: 2023-10-13
topic: "Laravel & PHP"
keywords: [laravel herd, php local development, php versions, docker, homebrew, nodenv, node versions, dbngin, database versions, vanity domains, local development setup, version management]
youtube_url: "https://www.youtube.com/watch?v=sY2A6AGF5os"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# No more Docker for PHP

## Chapters

- So long Homebrew (and Docker)
- Managing PHP versions
- Interacting with Laravel Herd
- Vanity local domains
- Multiple Node versions with nodenv
- Multiple database versions

## Transcript

**Aaron Francis:** Y'all, I'm done. I'm done using Homebrew to manage the dependencies on my local machine for web development, and I maintain my untarnished record of having never used Docker. Why don't I use Docker? Because I just don't want to. I'm gonna show you how I manage multiple versions of PHP, multiple versions of MySQL, Postgres, if you want it, I don't want it, Redis, and multiple Node versions across multiple

**Aaron Francis:** projects without using Homebrew, without using Docker. It makes my life so easy. The first thing I'm gonna show you is Laravel Herd. Laravel Herd is a desktop application for macOS machines that handles all of my PHP versioning, my local vanity URLs, web serving, all of that kind of stuff. Even though it's called Laravel Herd, it doesn't just support Laravel.

**Aaron Francis:** Out of the box, it supports Laravel and Symfony and WordPress and just plain static HTML, and a whole lot more. It's completely standalone. It doesn't rely on Homebrew or Docker under the hood. Everything you need comes statically bundled in the actual package. You can download newer or older versions of PHP if you need it.

**Aaron Francis:** It comes with DNSMASQ and Nginx statically bundled as well. So you can assign domains and subdomains on a per-project basis, and you can also set the PHP version on a per-project basis. So if we look at my machine here, and we run PHP and we get the version, you'll see I'm running PHP 8.1.24.

**Aaron Francis:** Now, I can just switch that by saying herd use php @8.2, and it'll switch it to 8.2. Even though Herd is a desktop application, I mostly interact with it through the command line here. So now if I run PHP and get the version, you'll see globally, I'm running PHP 8.2. So Herd manages my global PHP installation.

**Aaron Francis:** If we run which php, you'll see that it is in the Herd application support directory. Now, what if I want to run a specific PHP version for this particular application? I can say herd isolate php @8.1 for this specific application.

**Aaron Francis:** So you can see it updated it for 8.1, and then it restarted Nginx for the aaronfrancis.com site. But if I run php V again, you'll see that that is still 8.2. So if you've isolated your PHP version in a particular project, you would run herd php, and that will proxy it through to the specific PHP version for this project.

**Aaron Francis:** That's how I manage all the PHP versions on my machine across a whole bunch of different projects. It makes it so that I don't accidentally end up in Homebrew Hell, which for some reason, I tend to put myself there quite often. So this, this prevents that. I usually use the same PHP version across most projects, which is usually the most recent version, so should you.

**Aaron Francis:** But some projects are a little bit older, and in production, they'll still be running 8.0 maybe, and so I do isolate those projects so that my local machine matches production so that I don't run into any errors there. Before we move on and talk about databases, I wanna talk about domains for just a second. One of the really nice parts about Herd is that it sets up all of those vanity domains.

**Aaron Francis:** It can optionally do subdomains, and it can secure sites if for some reason you need to run a secure site locally. If you're familiar with Laravel Valet, this is gonna look pretty similar to you. That's because Herd comes with Laravel Valet. It sits on top of Laravel Valet. It builds on what Laravel Valet started with.

**Aaron Francis:** So I'm gonna show you how easy Herd makes this. I haven't set up DNSMASQ, I haven't set up Nginx, I haven't set up anything. But if I run herd open, it just works. It just shows up in the browser as aaronfrancis.com, which is the name of the directory, and then .test, which is the TLD that Herd assigns all of your local projects. And the way that this works is I told Herd, "Hey, anything that shows up in this code directory, I just want you to make it available.

**Aaron Francis:** Just make it available. Th- that's where I keep all of my projects." So if I change into a different directory and I say herd open, it'll open that one up, and Herd is gonna manage serving that project as well. If I want to add a subdomain, or I want it to be different than the name of the directory, I can just say herd link, and we'll just call this app.screencasting.com.

**Aaron Francis:** And now I can say herd open, and now app.screentesting-- screencasting.com.test is available, but also screencasting.com. So if I had two separate projects, one was the application and one was the marketing site, or I was testing multi-tenancy maybe, I could set up as many links as I want, and Herd would serve them all at the appropriate domains and subdomains.

**Aaron Francis:** Moving on from Laravel Herd, as much as I love Laravel Herd, that's enough about Herd. Let's talk about Node and databases. To manage multiple versions of Node on my machine, I use a package called Node Env, which is a fork from a similar package used for Ruby called Rbenv, and so it has a long and battle-tested history.

**Aaron Francis:** But the reason I like Node Env is that it changes my Node version when I change into a new directory. So I can pin a project at a specific Node version, and I don't have to remember to run nvm use or run a use command when I change into that directory. Anytime I change in there, it's just gonna use that Node version.

**Aaron Francis:** I'll show you here in this directory, I am running Node version 20.8, but if we change out to the aaronfrancis.com and run there, you'll see that I'm running Node 18.18. And the way that you can control this is you just have a .node version in the directory route. And so if we come back to screencasting, you'll see that the Node version is pinned to 20.8.0.

**Aaron Francis:** And I didn't have to remember anything. I just changed into the project directory, and it set the Node version for me, which is great, 'cause I love not having to remember things. The final thing- that we've gotta talk about is databases. How do we set up multiple databases, multiple versions of a single database? How do we do all of that in a sane and coherent way using a free application called DB Engine?

**Aaron Francis:** DB Engine is a great tool that I use all the time. In fact, it is the only tool that I use to manage what databases I have on my machine here. You can see that MySQL 8.0.27 is the only one that I have starting on login. That's what I use for most of my projects. But the other day, I needed MySQL 8.0.12 because I was testing out something, and it was just as easy as hitting this button, choosing MySQL, and choosing 8.0.12.

**Aaron Francis:** That's it. That's all it took to spin up a new database. I love that. As, as much as I love databases, I don't wanna manage them. I just wanna play with them. So you can do that for MySQL, Postgres, Redis, anything you need, and I like that it's integrated with my favorite SQL GUI, TablePlus, so I can click here, and boom, I'm ready to go.

**Aaron Francis:** I'm ready to play with the database. There's my setup for staying sane across multiple projects with multiple PHP, Node, database versions, types, all of that stuff. I think it's great. I love it. It makes me very productive. You may think that it's way too simple. That's fine. If you liked it, I would love to hear if you think that I've missed anything or if you would do anything differently.

**Aaron Francis:** If you hated it, I don't know that I ... You, you don't have to leave a comment. You really don't. If you think I'm an idiot, eh, that's fine. I'm okay with that. Let me know what you wanna see next. Until the next time, see ya.

---

## Related on aaronfrancis.com

- [Year in review: 2023](/writing/year-in-review-2023) *(Article · 2023-12-27 · shared: docker)*
- [(Extra) RailsConf Podcast Panel](/podcast/extra-railsconf-podcast-panel-72ccfdb0) *(Podcast · 2022-06-20 · shared: docker)*
- [The Landing Page Lives!](/podcast/the-landing-page-lives-7336bf78) *(Podcast · 2022-04-19 · shared: docker)*
- [Coffee, Renderless Components, and Confidence](/podcast/coffee-renderless-components-and-confidence-1e9b4408) *(Podcast · 2021-11-10 · shared: docker)*
- [Struggling with Laravel + Vite](/videos/struggling-with-laravel-vite) *(Video · 2024-07-16 · shared: laravel herd)*

## Relevant Resources from Aaron Francis

- **[Solo](https://soloterm.com)** (overview on site: [/software](/software)): All-in-one agentic development platform and terminal workspace built by Aaron Francis for orchestrating processes and AI coding agents.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `laravel herd` ([K-L](/llms/keywords/k-l.txt)), `php local development` ([O-P](/llms/keywords/o-p.txt)), `docker` ([D-E](/llms/keywords/d-e.txt)), `homebrew` ([H-J](/llms/keywords/h-j.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
