Zum Inhalt springen

Docker-based Development Environments with DDEV

Veröffentlicht am Nov 22, 2025 | ca. 2 Min. Lesezeit |

The days of XAMPP and MAMP are over. Modern PHP development requires reproducible environments that closely mirror the production server. Docker is ideal for this -- and DDEV makes it comfortable.

Why DDEV?

DDEV abstracts away the complexity of Docker and offers a specialized solution for PHP projects. The advantages:

  • Quick setup -- A single ddev config and ddev start is all it takes
  • Pre-configured -- PHP, MariaDB/MySQL, Nginx, Mailpit, phpMyAdmin
  • Multiple projects -- Each project gets its own isolated environment
  • SSL out of the box -- Automatic HTTPS certificates

Project Configuration

A typical .ddev/config.yaml looks like this:

name: mein-projekt
type: symfony
docroot: public
php_version: "8.2"
mariadb_version: "10.11"
webserver_type: nginx-fpm
timezone: Europe/Berlin
additional_hostnames:
  - mein-projekt.local

Useful DDEV Commands

These are the commands I use most frequently in my daily work:

# Projekt starten und stoppen
ddev start
ddev stop

# In den Container springen
ddev ssh

# Composer und Node.js
ddev exec composer install
ddev exec npm run build

# Datenbank-Import
ddev import-db --file=dump.sql.gz

# Logs anzeigen
ddev logs -f

Custom Commands

DDEV can be extended with custom commands. A file placed under .ddev/commands/web/ automatically becomes available as a command:

#!/bin/bash
## Description: Run PHPUnit tests
## Usage: phpunit
## Example: ddev phpunit

vendor/bin/phpunit "$@"

After that, you can simply run tests with ddev phpunit.

Team Collaboration

The greatest advantage of DDEV becomes apparent in a team setting: every developer has exactly the same environment. No more "it works on my machine" discussions. The .ddev/ configuration belongs in the Git repository, and new team members are up and running in just a few minutes.

DDEV has significantly simplified my development workflow. Anyone still struggling with local PHP installations should definitely consider making the switch.

Thomas Wunner

Thomas Wunner

Certified IT specialist for application development with an instructor qualification and over 14 years of experience building scalable web applications with Symfony and Shopware. When not coding, Thomas volunteers as a lifeguard with the Wasserwacht, performs as a DJ, and explores the countryside on his motorbike.

Kommentare

Kommentare werden von Remark42 bereitgestellt. Beim Laden werden Daten an unseren Kommentar-Server übertragen.