Linux mint中的Docker错误17 [英] Docker error in Linux mint 17

查看:220
本文介绍了Linux mint中的Docker错误17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Oracle VM中存在的Linux Mint 17 Qiana(基于Ubuntu 14.04)上安装了Docker。如果我尝试开始,它会显示以下错误,

  FATA [0000]获取http:/// var / run / docker.sock / v1.18 / containers / json:拨打unix /var/run/docker.sock:没有这样的文件或目录。您是否尝试连接到不带TLS的启用TLS的守护程序? 

当我尝试使用谷歌搜索时,我找不到任何有用的信息。这个stackoverflow的问题建议重新启动我的系统,但它不工作。



我看到以下相关问题无益。



/var/run/docker.sock : 无此文件或目录。您是否尝试连接到不带TLS的启用TLS的守护程序?





所以,对此的任何帮助将是非常有用的。

解决方案

不知道它是如何与 .deb 包(我使用Fedora),但TLS不应该默认设置,所以我建议遵循一些基本步骤看看它是否正常运行。



1。检查docker守护程序是否正在运行



  ps aux | grep docker 
根4215 0.1 0.1 440156 17332? Ssl 15:48 0:00 / usr / bin / docker -d -D --bip = 172.17.42.1 / 16 --dns = 172.17.42.1 --dns-search = docker -s overlay
wololock 8986 0.0 0.0 113024 2304 pts / 1 S + 15:50 0:00 / usr / bin / grep docker

I docker进程没有运行,尝试 sudo /etc/init.d/docker start sudo service docker start / p>

2。检查 /var/run/docker.sock 是否存在



  ls  - la /var/run/docker.* 
-rw-r - r--。 1根根4 04-23 15:48 /var/run/docker.pid
srw-rw ----。 1根码头0 04-23 15:48 /var/run/docker.sock

重要的部分这个文件需要由组 docker 自己拥有,所以你可以连接到它没有root权限。



如果 docker.sock 不存在,您可以尝试从调试模式的命令行运行docker,以查看导致问题的原因:

  sudo docker -d -D 



3。检查您的用户是否添加到 docker group



  id -a 
uid = 1000(wololock)gid = 1000(wololock)grupy = 1000(wololock),0(root),10(wheel),100(users),977(docker),989(pkg-build)

如果您在 docker group中找不到您的用户,尝试通过以下方式添加自己:

  sudo gpasswd -a [username] docker 



4。获取最新的docker版本



如果以前的尝试没有帮助,请尝试从 https://docs.docker.com/installation/ubuntulinux/#installing-docker-on-ubuntu 我不确定,但这行:

  FATA [0000]获取http:///var/run/docker.sock/v1.18/ container / json:

建议您使用docker v1.18。我可能是错的,但如果是真的,这不是最新的docker版本,应该升级。我使用目前的docker v1.5.0,它在Fedora 21上运行良好。



重要提示:UBUNTU / LINUX MINT USERS



我们在这里讨论的问题是由ubuntu / linuxmint发行版中缺少(或不运行) apparmor 软件包引起的。修复它的最简单的方法是安装apparmor:

  sudo apt-get install apparmor 

如果安装尚未运行,请启动:

 code> sudo service apparmor start 





我希望我的答案能帮助您解决问题。如果你有任何问题随时问。我会竭尽全力帮助你。


I have installed docker in Linux Mint 17 Qiana (which is based on Ubuntu 14.04) present in the Oracle VM. If I tries to start, it shows the following error,

FATA[0000] Get http:///var/run/docker.sock/v1.18/containers/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? 

I couldn't find any useful information regarding this when I tried googling regarding the same. This stackoverflow question suggesting to restart my system, but it doesn't work.

I'm seeing the following related questions which are unhelpful.

/var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Docker: Are you trying to connect to a TLS-enabled daemon without TLS?

So, any help on this would be greatly helpful.

解决方案

I don't know how it comes with .deb package (I'm using Fedora), but TLS shouldn't be set by default, so I would suggest following some basic steps to see if it is running correctly.

1. Check if docker daemon is running

ps aux | grep docker
root      4215  0.1  0.1 440156 17332 ?        Ssl  15:48   0:00 /usr/bin/docker -d -D --bip=172.17.42.1/16 --dns=172.17.42.1 --dns-search=docker -s overlay
wololock  8986  0.0  0.0 113024  2304 pts/1    S+   15:50   0:00 /usr/bin/grep docker

I the docker process is not running, try sudo /etc/init.d/docker start or sudo service docker start

2. Check if /var/run/docker.sock exists

ls -la /var/run/docker.*
-rw-r--r--. 1 root root   4 04-23 15:48 /var/run/docker.pid
srw-rw----. 1 root docker 0 04-23 15:48 /var/run/docker.sock

The important part here is that file need to be own by group docker, so you can connect to it without root permissions.

If docker.sock does not exist, you can try running docker from the command line with debug mode on to see what causes the problem:

sudo docker -d -D

3. Check if your user is added to docker group

id -a
uid=1000(wololock) gid=1000(wololock) grupy=1000(wololock),0(root),10(wheel),100(users),977(docker),989(pkg-build)

If you wont find your user in docker group, try adding yourself to it by:

sudo gpasswd -a [username] docker

4. Get the latest docker version

If the previous attempts wont help, try getting the latest docker version from https://docs.docker.com/installation/ubuntulinux/#installing-docker-on-ubuntu I'm not sure, but this line:

FATA[0000] Get http:///var/run/docker.sock/v1.18/containers/json:

suggests that you're using docker v1.18. I might be wrong, but if it's true, this is not the most recent docker version and it should be upgraded. I use currently docker v1.5.0, it works well on Fedora 21

IMPORTANT: UBUNTU / LINUX MINT USERS

The problem we discussed here was caused by missing (or not running) apparmor package in the ubuntu/linuxmint distribution. The easiest way to fix it is to install apparmor:

sudo apt-get install apparmor

If it's installed yet not running, start it with:

sudo service apparmor start

I hope my answer will help you in resolving your problem. If you have any questions, feel free to ask. I will try to help you as much as I can.

这篇关于Linux mint中的Docker错误17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆