0

устанавливал по инструкции Docker CE: https://docs.docker.com/install/linux/docker-ce/ubuntu/

чтобы убедиться что всё работает, запустил образ hello world, как и предложено на сайте :

$ sudo docker run hello-world

мне выдаёт сообщение: Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 1b930d010525: Pull complete Digest: sha256:92695bc579f31df7a63da6922075d0666e565ceccad16b59c3374d2cf4e8e50e Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

пытался получить образ предложенной командой

$ docker run -it ubuntu bash

он должен начать скачивать образ из репозитория, но выдает сообщение: docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'.

Помогите решить проблему

1
  • 1
    1. Hello from Docker! This message shows that your installation appears to be working correctly — требуется перевод? 2. sudo 4 мая 2019 в 14:53

1 ответ 1

1

вариант-1. запускать через sudo:

       sudo docker run -it ubuntu bash

вариант-2. добавить юзера в группу docker

       sudo usermod -aG docker $USER
       sudo reboot

и запускать без sudo:

       docker run -it ubuntu bash

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.