DDEV is built on Docker and Docker Compose. That’s why it can run the same in so many different environments, including macOS (both Apple Silicon and Intel natively), Windows WSL2, traditional Windows, and all flavors of Linux, even the Raspberry Pi. It works with many different Docker providers in all those places, including Colima, OrbStack, Rancher Desktop, and Docker Desktop on macOS, native Linux docker-ce on Linux and WSL2, and Docker Desktop on traditional Windows and WSL2.
Container Architecture (see docs): DDEV has several Docker containers that run at the same time to get the job done. You can think of them as little computers running on your computer but independent of your computer. Their jobs:
DDEV and docker-compose: Based on the configuration provided by the user, DDEV:
.ddev-docker-compose-base.yaml
) and then normalizes it using docker-compose itself (.ddev-docker-compose-full.yaml
)docker-compose build
to build the layers that DDEV adds on to the original file (adding a user with username and uid equal to the host-side user, adding any .ddev/web-build/Dockerfile.*
layers, etc.docker-compose up
to start the built systemddev-webserver
startup script which runs nginx and php-fpm, etc.ddev-router
if necessaryexport DDEV_DEBUG=true
to see all this happenDDEV Binary: The DDEV binary is compiled into a native binary for each architecture; the binary has no dependencies, no required libraries, etc. that’s one of the beautiful things about Golang is its ability to cross-compile native “fat” binaries. On macOS the binary for release is signed and notarized. On traditional Windows the ddev.exe is signed. Building is just a matter of make darwin_arm64
or make linux_amd64
for example.
“Real” project names and FQDNs and Trusted HTTPS: DDEV uses DNS for most people’s hostnames, for example something.[ddev.site](<http://ddev.site>)
. This is handled via DNS, *.ddev.site
(or other hostnames listed in additional_hostnames
look up as 127.0.0.1 (localhost). If DNS is unavailable or not using ddev.site
then the hosts file is manipulated. A local CA (Certificate Authority) is created with mkcert
and used by ddev-router
and also trusted by the browser or system, so you get trusted HTTPS.
Database Exports and Snapshots: On MySQL and MariaDB these are native mariabackup or xtrabackup images so can be loaded really fast. Exports are handled by the native tool, so ddev export-db
will use mysqldump
or pg_dump
in the db container to do the dump.