When I initially cloned a company repository and tried to start via ddev start I got the error message Failed waiting for web/db containers to become ready: web container failed. The container ddev-website-web stays unhealthy. The browser page shows an error.

1

There are 1 best solutions below

0
sneaky On BEST ANSWER

Short answer: The error is a known problem with overlayFS on ZFS, see Moby #45890 on github

Long answer: You can check easily, if the error fits to you.

When the ddev-web container is started you can login into the container via ddev ssh then show the user and groups of the folder /etc/apache2/sites-enabled/.

If the user and group is root, there will be an apache-Folder inside and in this folder the correct files will be inside. If you try to remove the folder with sudo rm -rf /etc/apache2/sites-enabled you will get an error invalid argument.

This pointed my college to this issue: issue 46640 on github

So please check, if you're using overlay mount with zfs with docker info

Storage Driver: overlay2
  Backing Filesystem: zfs

Then you can use this Solution:

To avoid this error, just do like in docker docu-use zfs described.

  • Be sure to backup all containers that You can't get via docker pull!
  • stop docker service docker stop
  • make sure to have enough free space (temporary)
  • create backup of docker-files: sudo cp -au /var/lib/docker /var/lib/docker.bk
  • if necessary, unmount mounted docker folders
    • cat /proc/mounts | grep docker
    • sudo umount /path (source: Github)
  • edit /etc/docker/daemon.json and add
    • { "storage-driver": "zfs" }
  • after saving file, start docker again service docker start
  • after a short time docker info should show Storage Driver: zfs
  • if everything works, remove the former docker folder sudo rm -rf /var/lib/docker.bk

Your problem should be solved.