这个问题出现呢,是因为用户权限问题。解决方法有2个:

  1. 切换为root用户执行命令。sudo docker-compose up -d 
  2. 将当前用户加入到docker组。sudo gpasswd -a ${USER} docker然后切换成root用户,再切换为当前用户,再次执行docker-compose up -d,就没有问题了。
➜  /usr/local/tidb-docker-compose git:(master) sudo gpasswd -a penelope docker
正在将用户“penelope”加入到“docker”组中
➜  /usr/local/tidb-docker-compose git:(master) su -
密码:
root@wjj-PC:~# su - penelope
➜  /home/penelope cd /usr/local/tidb-docker-compose
➜  /usr/local/tidb-docker-compose git:(master) docker-compose up -d
Creating network "tidb-docker-compose_default" with the default driver
Creating tidb-docker-compose_prometheus_1_c5dcdc31242f          ... done
Creating tidb-docker-compose_pd0_1_76eba4089930                 ... done
Creating tidb-docker-compose_dashboard-installer_1_aacf66ea2abb ... done
Creating tidb-docker-compose_pd1_1_37f2e3342d08                 ... done
Creating tidb-docker-compose_pushgateway_1_6bdd0daf84ee         ... done
Creating tidb-docker-compose_pd2_1_8f3958f98cb1                 ... done
Creating tidb-docker-compose_grafana_1_b1171d4ef96c             ... done
Creating tidb-docker-compose_tidb-vision_1_1cfffb488802         ... done
Creating tidb-docker-compose_tikv2_1_e8dda83dee83               ... done
Creating tidb-docker-compose_tikv0_1_df5a641d13f5               ... done
Creating tidb-docker-compose_tikv1_1_7d2d291b11a7               ... done
Creating tidb-docker-compose_tispark-master_1_6d1132a4e105      ... done
Creating tidb-docker-compose_tidb_1_8c9570604565                ... done
Creating tidb-docker-compose_tispark-slave0_1_722ac312ba0e      ... done

11-25 23:53