Search code examples
ddevcolima

Running ddev with colima in external hard disk or anywhere besides home directory


I'm trying to run ddev outside my home directory. Colima is the docker platform. I'm wondering how I am able to make it fully run in an external hard disk.

I've added a Drupal9 site in my external hard disk and ran ddev config.

I then started it using ddev start.

I tried installing a Drupal site using the following command but got an error:

$ ddev drush si --site-name="Drupal 9" --account-name="admin" --account-pass="admin"
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/mnt/ddev_config/.global_commands/web/drush": stat /mnt/ddev_config/.global_commands/web/drush: no such file or directory: unknown
Failed to run drush si --site-name=Drupal 9 --account-name=admin --account-pass=admin: exit status 126

Is there a way to have ddev fully run in the external hard disk? Thanks!


Solution

  • Colima by default mounts only the home directory. You can make it mount other things in the config file. You'll want to experiment with the mounts configuration in colima.yml. The default is:

    # Colima default behaviour: $HOME and /tmp/colima are mounted as writable.
    # Default: []
    mounts: []