ubuntu - 无法在 Ubuntu 中启动 Docker

标签 ubuntu docker sudo

ubuntu-gnome@ubuntu-gnome:~$ docker images

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.30/images/json: dial unix /var/run/docker.sock: connect: permission denied


ubuntu-gnome@ubuntu-gnome:~$ sudo docker images

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ubuntu-gnome@ubuntu-gnome:~$ 

最佳答案

安装 docker 后,默认不运行。假设这是 Ubuntu 16.04

您需要在下面运行以启动 docker

$ sudo systemctl start docker

并在下面将其设置为在启动时启动
$ sudo systemctl enable docker

关于ubuntu - 无法在 Ubuntu 中启动 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45931993/

相关文章:

python - SyntaxError : invalid syntax on lib/python3. 8/site-packages/sql_server/pyodbc/base.py django 在 Linux 上部署

c# - MONO 4.6.2 服务器 CPU 使用率高

php - 在ubuntu上部署laravel 5,得到白页

api - 通过 docker API 将 args 传递给容器

linux - ubuntu 备份管理器权限被拒绝

security - 密码不正确,为什么 `sudo`变慢?

基于 ARM 的 mySQL C 连接器

docker - ssh-agent 不在 jenkins 管道上工作

linux - 语法错误 : Multiline bash command in dockerfile RUN statement

docker - 没有找到编辑器(编辑器路径 =/usr/bin/editor)正在运行 visudo