Experimental Docker Configurations¶
Remote Docker Instances¶
You can use remote Docker instances, whether on the internet, inside your network, or running in a virtual machine.
On the remote machine, the Docker port must be exposed if it’s not already. See instructions for how to do this on a systemd-based remote server. Be aware that this has serious security implications and must not be done without taking those into consideration. In fact,
Binding to IP address without --tlsverify is insecure and gives root access on this machine to everyone who has access to your network. host="tcp://0.0.0.0:2375".
If you do not already have the Docker client installed (like you would from Docker Desktop), install just the client with
brew install docker.
- Create a Docker context that points to the remote Docker instance. For example, if the remote hostname is
docker context create debian-11 --docker host=tcp://debian-11:2375 && docker use debian-11. Alternately, you can use the
DOCKER_HOSTenvironment variable, e.g.
- Make sure you can access the remote machine using
- Bind mounts cannot work on a remote Docker setup, so you must use
ddev config global --no-bind-mounts. This will cause DDEV to push needed information to and from the remote Docker instance when needed. This also automatically turns on Mutagen caching.
- You may want to use a FQDN other than
*.ddev.sitebecause the DDEV site will not be at
127.0.0.1. For example,
ddev config --fqdns=debian-11and then use
https://debian-11to access the site.
- If the Docker host is reachable on the internet, you can actually enable real HTTPS for it using Let’s Encrypt as described in Casual Webhosting. Just make sure port 2375 is not available on the internet.
Rancher Desktop on macOS¶
Rancher Desktop integration currently has no automated testing for DDEV integration.
- By default, Rancher Desktop will provide a version of the Docker client if you don’t have one on your machine.
- Rancher changes over the “default” context in Docker, so you’ll want to turn off Docker Desktop if you’re using it.
- Rancher Desktop does not provide bind mounts, so use
ddev config global --no-bind-mountswhich also turns on Mutagen.
- Use a non-
ddev config --additional-fqdns=rancherfor example, because the resolution of
*.ddev.siteseems to make it not work.
- Rancher Desktop does not seem to currently work with
https, so turn those off with
mkcert -uninstall && rm -r "$(mkcert -CAROOT)". This does no harm and can be undone with just