Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Unable to connect to Docker TCP service #1374

@crawford

Description

@crawford


Issue by MarcDiethelm


  • MacOSX 10.9.3
  • OpenSSH_6.2p2
  • Virtualbox 4.3.12
  • Vagrant 1.6.3
  • Coreos v343.0.0 and v349.0.0

Setting $expose_docker_tcp=2375 in config.rb and invoking export DOCKER_HOST='tcp://127.0.0.1:2375' does not give the expected results.

local shell:

$ docker images
2014/06/17 10:37:10 Get http://127.0.0.1:2375/v1.12/images/json: EOF

VM:

$ cat /etc/systemd/system/docker-tcp.socket
[Unit]
Description=Docker Socket for the API

[Socket]
ListenStream=127.0.0.1:2375
Service=docker.service
BindIPv6Only=both

[Install]
WantedBy=sockets.target

Set via project user-data:

$ cat /var/lib/coreos-vagrant/vagrantfile-user-data
#cloud-config

coreos:
 etcd:
 #generate a new token for each unique cluster from https://discovery.etcd.io/new
 #discovery: https://discovery.etcd.io/<token>
 addr: $public_ipv4:4001
 peer-addr: $public_ipv4:7001
 units:
 - name: etcd.service
 command: start
 - name: fleet.service
 command: start
 runtime: no
 content: |
 [Unit]
 Description=fleet

 [Service]
 Environment=FLEET_PUBLIC_IP=$public_ipv4
 ExecStart=/usr/bin/fleet
 - name: docker-tcp.socket
 command: start
 enable: true
 content: |
 [Unit]
 Description=Docker Socket for the API

 [Socket]
 ListenStream=127.0.0.1:2375
 Service=docker.service
 BindIPv6Only=both

 [Install]
 WantedBy=sockets.target
 - name: enable-docker-tcp.service
 command: start
 content: |
 [Unit]
 Description=Enable the Docker Socket for the API

 [Service]
 Type=oneshot
 ExecStart=/usr/bin/systemctl enable docker-tcp.socket

On the VM docker commands are working. But the docker commands in the local shell fail.
Probably unrelated but I'm also seeing a ssh connection error in vagrant up. See: #131

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions