zoukankan      html  css  js  c++  java
  • ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket

    ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

    docker 每次都要sudo, 或者其他服务启动的时候,提示上述的错误

    • 如果还没有 docker group 就添加一个:

      sudo groupadd docker
    • 将用户加入该 group 内。然后退出并重新登录就生效啦。

      sudo gpasswd -a ${USER} docker
    • 重启 docker 服务

      sudo service docker restart
    • 切换当前会话到新 group 或者重启 X 会话

      newgrp - docker
    1. Run this command to download the current stable release of Docker Compose:

      sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      

      To install a different version of Compose, substitute 1.24.0 with the version of Compose you want to use.

      If you have problems installing with curl, see Alternative Install Options tab above.

    2. Apply executable permissions to the binary:

      sudo chmod +x /usr/local/bin/docker-compose
      

    Note: If the command docker-compose fails after installation, check your path. You can also create a symbolic link to /usr/bin or any other directory in your path.

    For example:

    sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
    
    1. Optionally, install command completion for the bash and zsh shell.

    2. Test the installation.

      $ docker-compose --version
      docker-compose version 1.24.0, build 1110ad01
  • 相关阅读:
    Vagrant安装virtualbox
    SQLSERVER排查CPU占用高的情况
    删除重复记录,只留一条
    ASCII码对应表chr(9)、chr(10)、chr(13)、chr(32)、chr(34)、chr(39)、……
    手机和PC端的录屏软件
    2017年初面试总结
    Python面向对象
    Python字体颜色
    Python第二模块总结
    Fiddler使用教程(转)
  • 原文地址:https://www.cnblogs.com/studyNT/p/10836021.html
Copyright © 2011-2022 走看看