Download and install Docker Desktop app.
Run the following command:
etc=/Applications/Docker.app/Contents/Resources/etc
ln -s $etc/docker.bash-completion $(brew --prefix)/etc/bash_completion.d/docker
ln -s $etc/docker-compose.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-compose
This assumes that bash
and bash-completion
packages were installed via brew.
Latest guide: Docker official documentation