Docker command can't connect to Docker daemon

后端 未结 23 3124
有刺的猬
有刺的猬 2020-12-02 04:01

I want to make a move to Docker, so I\'ve just started to mess around with it. I\'ve installed Docker on a VirtualBox Ubuntu 15.10 (Wily Werewolf) installation and as sugges

23条回答
  •  [愿得一人]
    2020-12-02 04:09

    Tested in Ubuntu 16.04

    # Create the docker group and add your user to the docker group
    groupadd docker
    usermod -aG docker $USER
    newgrp docker
    
    # Configure docker service to be exposed
    mkdir -p /etc/systemd/system/docker.service.d
    echo -e '[Service]\nExecStart=\nExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376' >> /etc/systemd/system/docker.service.d/override.conf
    
    # restart service
    systemctl daemon-reload
    service docker restart
    

提交回复
热议问题