I installed the Docker desktop application on my Mac (Apple Silicon). With all the necessary docker files from a cloned project, I ran this command
sudo docker-compose up --build
It asked for my computer password but then threw this error
20:34:16 must use ASL logging (which requires CGO) if running as root
[+] Running 0/0
⠋ postgres Pulling 0.0s
error getting credentials - err: exit status 1, out: ``
Run the Docker daemon as a non-root user:
docker-compose up --build
That is why the password was requested. As you have Docker Desktop installed on your Mac M1 there should be no reason to run as root. However, if there is a requirement to have privileged permission to run Docker Desktop, then follow this guide: