zoukankan      html  css  js  c++  java
  • docker镜像加速遇见的一个问题

    今天运行docker发现了一个问题,运行docker images会报

    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    但是运行docker -v是正常的

    运行 systemctl start docker报

    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

    最后查了一下,发现如果docker 出了问题,可以根据提示使用linux命令journalctl -xe查看,这个命令是系统的服务出错以后会有日志记录的地方,或者你专注于某个服务的查询的话,比如docker,可以使用 journalctl -u docker.service

    通过这个查询到问题是:

    unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

    原来是我的daemon.json配置的有问题,按照阿里云给出的步骤应该只在这个文件里写

    { "registry-mirrors": ["https://给你的地址开头.mirror.aliyuncs.com"] }

    但是我把linux的其他命令也写进去了。

    通过这次解决问题,主要还是学到了查看系统日志去解决服务出问题的情况。

  • 相关阅读:
    HDU 4912 Paths on the tree(LCA+贪心)
    BZOJ 1044 木棍分割(二分答案 + DP优化)
    Codeforces 551E GukiZ and GukiZiana(分块思想)
    计蒜客 UCloud 的安全秘钥(随机化+Hash)
    HDU 5794 A Simple Chess(杨辉三角+容斥原理+Lucas定理)
    mac-profile
    mac-httpd
    launchctl
    brew
    操作系统
  • 原文地址:https://www.cnblogs.com/llcdbk/p/11342337.html
Copyright © 2011-2022 走看看