I am going to explain the issue and solutions while installing
docker-compose on Mac OS 10.12.6 or older versions.
For the past couple days I was supporting work on the Mautic open source project issue. But because of my older Mac OS I was not able to install PHP's latest version which supports the latest Mautic version. So the community has suggested using ** ddev ** installation to use a virtual environment without worrying about local machine compatibility. But my struggle does not end here. To use
ddev prerequisites was to install
docker-compose. None of them was compatible with the Mac OS 10.12.6 version. I struggled a lot no where I found a combined blog where I got a solution to fix the issue, so I thought of writing these steps to solve the issue which can help any other developer who will face this same issue in old Mac OS ( Problem is can't upgrade OS ).
What is DDEV ?
DDEV is an open source tool that makes it dead simple to get local PHP development environments up and running within minutes. It's very powerful and flexible as it per project wise environment. In short, DDEV aims to allow development teams to use Docker in their workflow without the complexities of bespoke configuration. More details can found here
Let's start with steps to installation of
As per document of
ddev installation site. We have to run below command
brew install drud/ddev/ddev
But, it throws an error about not supporting the OS version error.
Homebrew does not support your OS version, so you'll need to use the
install_ddev.sh technique. See the script installation technique at https://ddev.readthedocs.io/en/stable/
Note: I imagine you'll also find that docker desktop doesn't support your os version though.
To install via sh script. You run below script :
curl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh && bash install_ddev.sh
Cool ! Installation of
ddev is completed. but when you trying to command
ddev start it will throw error saying
Could not connect to docker. Please ensure Docker is installed and running.
Docker can't be installed directly by installing docker desktop app because it does not support older versions of Mac OS 10.12.6. Then installation steps will be different.
$ brew install docker docker-machine $ brew cask install virtualbox It will ask for password to address system preference setting. $ docker-machine create --driver virtualbox default $ docker-machine env default $ eval "$(docker-machine env default)" $ docker run hello-world $ docker-machine stop default $ brew install docker-compose
brew install docker docker-machine run this below command to link this version. Otherwise your will see error of
docker command not found
brew link docker
Make sure while running
ddev start docker default image should run. By following these steps docker will not available in Application of Mac OS. because this docker cli installation.
Hope this blog will help you to solve installation issue. If you have query related to you can reach out to me over my twitter handle @aviboy2006
Reference which help me and thank to this references :