Skip to content

-endpoint works differently depending on presence of -watch flag #18

Closed
@r4j4h

Description

@r4j4h

When the container is started, the instructions suggest -v /var/run/docker.sock:/tmp/docker.sock. The following is a non issue if one uses -v /var/run/docker.sock:/var/run/docker.sock instead. Since the instructions suggest otherwise, I think I should report this behavior.

Note that this is a Docker image based off of FROM tianon/centos:6.5.

Without -watch, /tmp/docker.sock is needed.

bash-4.1# ./docker-gen -endpoint unix://tmp/docker.sock templates/some.tmpl some.out
2014/07/10 14:38:20 error listing containers: dial unix /docker.sock: no such file or directory

bash-4.1# ./docker-gen -endpoint unix:/tmp/docker.sock templates/some.tmpl some.out
2014/07/10 14:38:25 Generated 'some.out' from 5 containers

With -watch, ///tmp/docker.sock is needed.

bash-4.1# ./docker-gen -watch -endpoint unix:/tmp/docker.sock templates/some.tmpl some.out
2014/07/10 14:38:59 Contents of some.out did not change. Skipping notification ''
2014/07/10 14:38:59 Watching docker events
2014/07/10 14:38:59 cannot connect to docker: Invalid bind address format: unix:/tmp/docker.sock

bash-4.1# ./docker-gen -watch -endpoint unix://tmp/docker.sock templates/some.tmpl some.out
2014/07/10 14:39:08 error listing containers: dial unix /docker.sock: no such file or directory
2014/07/10 14:39:08 Watching docker events
2014/07/10 14:39:08 cannot connect to docker: dial unix tmp/docker.sock: no such file or directory

bash-4.1# ./docker-gen -watch -endpoint unix:///tmp/docker.sock templates/some.tmpl some.out
2014/07/10 14:39:16 Contents of some.out did not change. Skipping notification ''
2014/07/10 14:39:16 Watching docker events

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions