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

前端 未结 20 2341
暗喜
暗喜 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:39

    For me the following steps worked:

    1. I noticed that running docker run hello-world fails with this socked error as in the question, but running sudo docker run hello-world worked.
    2. I added my current user to the docker group, sudo adduser user docker. Then you must restart your machine or use su - user (check using groups command if are in the docker group).

    After that, hello-world started to work.

    My answer is based on How can I use docker without sudo? which explains what go wrong.


提交回复
热议问题