当我想用命令
删除所有图像时sudo docker rmi -f $(docker images -q)
我有
WARNING: Error loading config file:stat /home/developer/.docker/config.json: permission denied
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
docker: "rmi" requires a minimum of 1 argument.
See 'docker rmi --help'.
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
但是使用命令
删除图像的图像sudo docker rmi c4bea91afef3
然后它完美无缺。
答案 0 :(得分:2)
sudo
仅影响docker rmi
。您需要为docker images
再次指定:
sudo docker rmi -f $(sudo docker images -q)