v1.19.0-alpha5: Improved `ddev exec` behavior
Pre-release
Pre-release
Highlights of this release
ddev exec
and lots of other commands likeddev mysql
andddev drush
andddev php
now behave much better with quoted arguments.
Installation/Upgrade
See the installation instructions for details, but it's easy:
- macOS:
brew install drud/ddev-edge/ddev
or justbrew upgrade drud/ddev-edge/ddev
). (You may need abrew update
for homebrew to find the new release.). - Traditional Windows: Use
choco upgrade -y --pre ddev
to get this one, or download the ddev_windows_installer below. - Linux or WSL2 (macOS works too) use the install_ddev.sh script: Download the script, make it executable, and run it with the version:
./install_ddev.sh <version>
or orcurl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh && bash install_ddev.sh v1.19.0-alpha5
- If you already had ddev installed with homebrew you'll want tobrew unlink ddev
first. - And anywhere, you can just download the tarball or zipball, untar or unzip it, and place the executable in your path where it belongs.
- Consider
ddev delete images
after upgrading to free up disk space used by previous docker image versions. This does no harm.
🚛 Key changes
- ddev exec and and lots of other commands like
ddev mysql
andddev drush
andddev php
now behave much better with quoted arguments, see #2547 - Postgres is now supported (versions 9-14) as well as MariaDB and MySQL.
ddev config --database=postgres:14
. import-db, export-db, snapshot, and snapshot restore work. (Snapshots don't work with postgres:9 yet). ddev get
will now download and install a maintained, supported, and tested recipe for add-ons like services, custom commands and provider integrations, see docs.ddev service enable
andddev service disable
now enable and disable add-on services.- You can now run ddev without Docker Desktop on both macOS and Windows.
- Experimental colima support on macOS works great. Note that Colima is a new project and may experience instability, but it seems to work wonderfully. 🙏🏼 to Tag1 Consulting for sponsoring this feature!
- On Windows you can install docker inside wsl2 instead of using Docker Desktop.
- DDEV now can work with a remote docker instance.
- DDEV now supports docker contexts and the DOCKER_HOST environment variable.
- You can now install the current HEAD version of ddev with
brew unlink ddev && brew install --HEAD drud/ddev/ddev
- Bare in-container hostnames: You can (once again) use in-container hostnames like
db
orsolr
without having to use fully-qualified names likeddev-<project>-db
. Thanks to @jonaseberle for heroic work pioneering a path forward for this, it will make using DDEV easier for everybody. - You can remove all links: sections from custom service definitions that mapped a service name onto itself (e.g.
links: solr:solr
). This used to be needed to prioritize name resolving inside the project, but it's now taken care of by a project-local network. (However, theselinks:
lines do no harm.) - WordPress default configuration is significantly improved thanks to @timnolte.
- Database snapshots are now gzipped, resulting in perhaps 20x size difference. A snapshot that used to use 207MB on disk is now 5MB.
- Networking:
- There is now a dedicated project-local network which is managed by docker-compose. All project services are in that network by default, even without any
networks:
stanza. From insidedocker-compose.*.yaml
files you would refer to it as default. Its global docker network name isddev-<projectname>_default
. This change allowed us to make sure that name resolving would always prioritize project-local services. - There is a new network named
ddev
, created automatically onddev start
. Its default function is that it is the network which contains ddev-router. As such you have to add it to all services to it that need to be reached by the router, which normally means 3rd-party services that haveHTTP_EXPOSE
in them. (see "caveats") - This network is also reused for inter-project communication (for example a db that you want to access as
ddev-<projectname>-db
from another project during upgrading). See "caveats" on how to enable cross-project access.
- There is now a dedicated project-local network which is managed by docker-compose. All project services are in that network by default, even without any
Minor changes
- Hook information like "Running ... " for a hook doesn't show by default now. If you want to see it you can
export DDEV_DEBUG=true
⚠️ Caveats
- Users with exotic workarounds to the previous bash-interpreted strings for composer and exec commands will have to simplify them.
- Alpha testers will have a bad ~/.ddev/commands/web/php that should be removed (and will automatically be replaced)
- Customized script commands like drush or php won't be replaced by ddev, so you may want to rm them. So for example, if you have a ~/.ddev/commands/web/drush or
<project>/.ddev/commands/web/drush
that does not have#ddev-generated
in it, then you'll want to remove it or update it. - ddev no longer pesters about overridden commands (when project has a drush command that overrides the global drush command, for example)
- xdebug now connects to the new standard port 9003 instead of port 9000. With PhpStorm this should be invisible to all, since it listens on both ports. With vscode you may have to edit the launch.json file, see https://ddev.readthedocs.io/en/latest/users/snippets/launch.json
- A new networks stanza needs to be added to all 3rd-party
docker-compose.*.yaml
services that use HTTP_EXPOSE (like solr) or that want to be reached from other ddev projects (If you are unsure, add the stanza. It does not hurt):networks: [default, ddev_default]
- With Colima you cannot mount single files into a container. This means that the traditional docker-compose.solr.yaml can't work, because it tries to mount a single file. However, the soon-to-be-standard ddev-contrib solr recipe should work because it doesn't try to mount a single file.
- There are loads of significant changes here, including how docker works, how database management is done, and what docker environments you can work with. Please pay attention and report your experiences, good or bad! 🙏🏼
What's Changed
- [docs] update vscode docs to use ${workspaceFolder} instead of ${workspaceRoot} by @andy-blum in https://github.com/drud/ddev/pull/3580
- Remove duplicate networks key in docs by @webflo in https://github.com/drud/ddev/pull/3581
- [docs] Fix new things markdownlint wants fixed by @rfay in https://github.com/drud/ddev/pull/3595
- Command
docker context show
not available on all docker client versions by @gambry in https://github.com/drud/ddev/pull/3589 - Support DDEV_GITHUB_TOKEN for github lookups, fixes #3586 by @rfay in https://github.com/drud/ddev/pull/3596
- Set writable perms on /var/lib/php in ddev-webserver start.sh by @rfay in https://github.com/drud/ddev/pull/3391
- Remove special handling for gitpod getting host.docker.internal by @rfay in https://github.com/drud/ddev/pull/3597
- Bump actions/github-script from 5 to 6 by @dependabot in https://github.com/drud/ddev/pull/3601
- Don't let ddev continue processing if docker context inspect doesn't work, fixes #3548 by @rfay in https://github.com/drud/ddev/pull/3605
- Improve handling of
ddev exec
,ddev composer
and exec hooks by adding--raw
, fixes #2547 by @rfay in https://github.com/drud/ddev/pull/3603
New Contributors
- @durmazmehmettemax made their first contribution in #3467
- @jonasbn made their first contribution in #3466
- @timnolte made their first contribution in #3468
- @nico-loeber made their first contribution in #3574
- @gambry made their first contribution in #3589
Full Changelog: v1.18.2...v1.19.0-alpha5