我正在尝试了解Docker,但我一直在收到一些神秘的错误消息.
可能最简单的例子是尝试打印我安装的Docker版本:
$ sudo docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
FATA[0000] Get http:///var/run/docker.sock/v1.16/version:
dial unix /var/run/docker.sock: no such file or directory.
Are you trying to connect to a TLS-enabled daemon without TLS?
Run Code Online (Sandbox Code Playgroud)
我刚刚浏览了用户指南并完全遵循了每一步,所以我很惊讶我收到了这条消息......我现在该怎么办?
我只是注意到,如果我不使用sudo我不会得到错误:
$ docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API …Run Code Online (Sandbox Code Playgroud) 我是码头工人的新手.我有一个shell脚本将数据加载到impala中,我想要一个运行的docker文件构建一个映像并运行容器.我在mac上,安装了boot2docker并DOCKER_HOST设置了env.
bash-3.2$ docker info
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Dirs: 0
Execution Driver: native-0.2
Kernel Version: 3.15.3-tinycore64
Debug mode (server): true
Debug mode (client): false
Fds: 10
Goroutines: 10
EventsListeners: 0
Init Path: /usr/local/bin/docker
Sockets: [unix:///var/run/docker.sock tcp://0.0.0.0:2375]
Run Code Online (Sandbox Code Playgroud)
我试图使用以下方法安装预先构建的图像:
sudo docker pull busybox
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
sudo docker pull busybox
2014/08/18 17:56:19 Post http:///var/run/docker.sock/images/create?fromImage=busybox&tag=: dial unix /var/run/docker.sock: no such file or directory
我的码头设置有问题吗?
当我这样做时docker pull busybox,它会拉动图像并完成下载.
bash-3.2$ docker pull busybox
Pulling repository busybox
a9eb17255234: …Run Code Online (Sandbox Code Playgroud) 我正在尝试在Docker容器中安装Web应用程序.
我正在使用OS X Yosemite版本10.10.1
我一直在关注Dockerizing Node.js Web App的教程:https://docs.docker.com/examples/nodejs_web_app/
我下载并设置了boot2docker osx-installer:github.com/boot2docker/osx-installer/releases/tag/v1.4.1
我按以下顺序在控制台中输入了这些命令:
$ boot2docker init
$ boot2docker start
$ (boot2docker shellinit)
然后我按照终端的指示,使用以下命令设置环境变量:
$ export DOCKER_TLS_VERIFY=1
$ export DOCKER_HOST=tcp://192.168.59.103:2376
$ export DOCKER_CERT_PATH=/Users/myusername/.boot2docker/certs/boot2docker-vm
在这一点上,一切似乎都正常.
然后,按照Dockerizing Node.js应用程序的教程,我得到了这一点:https://docs.docker.com/examples/nodejs_web_app/#building-your-image ,您可以在其中输入命令:
$ sudo docker build -t <your username>/centos-node-hello .
然后是要求输入密码,然后在输入后我不断收到此错误消息:
Sending build context to Docker daemon
FATA[0000] Post http:///var/run/docker.sock/v1.16/build?rm=1&t=myusername%2Fcentos-node- hello: dial unix /var/run/docker.sock: no such file or directory
这是我的env变量:
`TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/vb/vmd78vk57mqd6fv7sqb544pc0000gn/T/
DOCKER_HOST=tcp://192.168.59.103:2376
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.BBIW525XNA/Render
TERM_PROGRAM_VERSION=343
OLDPWD=/Users/myusername/Desktop
TERM_SESSION_ID=FAD1F3F1-35DF-4183-A47A-08749EAFEACB
USER=myusername
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.A6ZjHwx8eq/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
DOCKER_TLS_VERIFY=1
PATH=/Users/myusername/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin …Run Code Online (Sandbox Code Playgroud)