sudo usermod -aG ${USER} docker
重新创建容器即可
docker-compose up -d servie
# macOS Docker
$ mkdir -p ~/.docker
# Linux Docker
$ sudo mkdir -p /etc/docker
$ sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://muehonsf.mirror.aliyuncs.com"]
}
EOF
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker