Why is Docker needed for DDEV?

ke flag

I need to establish a Drupal development environment on Windows 10 and I consider DDEV.

I read that DDEV requires Docker but I never worked with Docker. Why is it required for DDEV and should I master Docker itself before developing Drupal on DDEV (or any similar software for that matter)?

berliner avatar
bd flag
It's literally part of their tagline: "DDEV simplifies integrating the power and consistency of **containerization** into your workflows."
cn flag
I don't think your question is well suited to the site, and the down-votes suggests others agree. You can try asking in chat if you wish to discuss instead.
apaderno avatar
us flag
They decided to use Docker for the containers. It sounds like asking why PHP is required to run Drupal.
leymannx avatar
ne flag
You don't need to know Docker. DDEV does it for you. If you need really advanced customisations their docs are excellent.
ma flag

I would rather write this as a comment, because although I'm experienced with Docker, I never used DDEV, but I don't have enough reputation for that.

There's the How DDEV Works page in DDEV documentation which seems to answer your questions.

Why is [Docker] required for DDEV[?]

DDEV is a high-level application which handles lifetime of various PHP development environments. Docker is a tool used to create and configure multiple virtual computers1) (Docker containers) which run services needed for a task.

So Docker is required, because it's a tool used by DDEV to do its work, because DDEV actually does't know how to create virtual computers, it manages them and theirs configurations. It's similar to an administrator who manages an OS installed in a company's computer, but the administrator does not actually create/implement the OS.

In other words:

  • DDEV: my user wants a new PHP dev environment. So from their settings, I generated this configuration of multiple virtual computers. But I actually don't know how to start them, so Docker, please, could you do it for me?
  • Docker: Alright, got it.

Should I master Docker itself before developing Drupal on DDEV[?]

This answer is derived from the documentation, not from experience (that's why I would prefer to write it as a comment).

DDEV's main purpose is to manage Docker containers for you so you can focus on the higher level tasks. So the answer seems to be: no, it's not necessary, as DDEV is a layer on top of Docker. DDEV is there so you don't have to handle all that complicated Docker stuff.

That being said, I would recommend to learn core basics about Docker (e.g. what are Docker images and containers and what's the difference between them, how does Docker run on Windows, ...), because it might help to understand problems when something goes wrong. (This depends on how well DDEV handles issues.)

1) Note that a Docker container is not a fully virtualised machine, it's a lightweight isolated environment. It runs natively on Linux, so on Windows, there's another layer of virtualisation. But all of that is out of scope for this question.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.