Permission denied using docker command in mac
I was using Docker Desktop for mac with intel chip.
When I tried to build docker image, I faced error message below.
I was able to build image with sudo, but I couldn’t bear it.
ERROR: open /Users/user/.docker/buildx/activity/desktop-linux: permission denied
The error was due to the ownership of the docker folder. I guess somehow Docker Desktop install as root user.
I had to change the ownership from root to me to make it writable by me.
The following command have solved the problem.
sudo chown -R $(id -u):$(id -g) $HOME/.docker
- References