Am I trying to connect to a TLS-enabled daemon without TLS?

前端 未结 20 2405
暗喜
暗喜 2020-11-28 17:56

I\'m trying to learn about Docker, but I keep getting cryptic (to me) error messages.

Possibly the simplest example of this is trying to print the version of Docker

20条回答
  •  余生分开走
    2020-11-28 18:43

    The Docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using sudo. The Docker daemon always runs as the root user.

    sudo groupadd docker
    sudo usermod -aG docker $USER
    

    Log out and log back in so that your group membership is re-evaluated.

    docker run hello-world
    

    Source: Manage Docker as a non-root user

提交回复
热议问题