Check if Docker is already installed.
docker psInstall Rosetta, a necessary component for Docker.
softwareupdate --install-rosettaCheck if Docker.dmg file exists.
ls Docker.dmgMount the Docker.dmg disk image.
sudo hdiutil attach Docker.dmgRun the Docker installation.
sudo /Volumes/Docker/Docker.app/Contents/MacOS/installUnmount the Docker.dmg disk image.
sudo hdiutil detach /Volumes/DockerVerify Docker installation.
docker psReload the shell configuration.
source ~/.zshrcVerify Docker path.
which docker