Skip to content

Instantly share code, notes, and snippets.

@swade1987
Last active June 23, 2016 13:00
Show Gist options
  • Save swade1987/c5ef22d679993719373be05ebd440d7e to your computer and use it in GitHub Desktop.
Save swade1987/c5ef22d679993719373be05ebd440d7e to your computer and use it in GitHub Desktop.
ubuntu@ip-10-1-131-61:/var/fabio$ docker network ls
NETWORK ID NAME DRIVER
f837ed21e749 bridge bridge
a198f8d32c1a ci overlay
cc05b011873e ci overlay
5ed2bd6dbb0b docker_gwbridge bridge
e216b9e5ac9d host host
ed27a6f4e2ae none null
ubuntu@ip-10-1-131-61:/var/fabio$ export DOCKER_HOST=tcp://10.1.1.231:80
ubuntu@ip-10-1-131-61:/var/fabio$ docker info
Containers: 6
Running: 5
Paused: 0
Stopped: 1
Images: 9
Server Version: swarm/1.2.3
Role: replica
Primary: 10.1.66.229:80
Strategy: spread
Filters: health, port, containerslots, dependency, affinity, constraint
Nodes: 2
ip-10-1-69-62: 10.1.69.62:2375
└ ID: F365:7FJG:N2Q4:RIRI:ZC6M:DVM2:BCP4:HHHQ:YMO3:F7PF:OWHY:DKTA
└ Status: Healthy
└ Containers: 3
└ Reserved CPUs: 0 / 2
└ Reserved Memory: 0 B / 4.051 GiB
└ Labels: executiondriver=, kernelversion=4.4.0-24-generic, operatingsystem=Ubuntu 16.04 LTS, storagedriver=aufs
└ UpdatedAt: 2016-06-23T12:59:43Z
└ ServerVersion: 1.11.2
ip-10-1-131-61: 10.1.131.61:2375
└ ID: TTMW:7RVK:EKFL:H5NT:JF6F:UB33:N2XJ:MZNV:K7QG:OOVU:5BGB:5WSE
└ Status: Healthy
└ Containers: 3
└ Reserved CPUs: 0 / 2
└ Reserved Memory: 0 B / 4.051 GiB
└ Labels: executiondriver=, kernelversion=4.4.0-24-generic, operatingsystem=Ubuntu 16.04 LTS, storagedriver=aufs
└ UpdatedAt: 2016-06-23T12:58:55Z
└ ServerVersion: 1.11.2
Plugins:
Volume:
Network:
Kernel Version: 4.4.0-24-generic
Operating System: linux
Architecture: amd64
CPUs: 4
Total Memory: 8.101 GiB
Name: 6f396d9b99dc
Docker Root Dir:
Debug mode (client): false
Debug mode (server): false
WARNING: No kernel memory limit support
ubuntu@ip-10-1-131-61:/var/fabio$ sudo docker run -d \
> -p 80:80 \
> -p 8080:8080 \
> --name=traefik \
> --net=ci \
> emilevauge/traefik \
> -l DEBUG \
> -c /dev/null \
> --docker \
> --docker.domain=ci.ukpds.org \
> --docker.endpoint=tcp://10.1.66.229:80 \
> --docker.watch \
> --web
ae3196de0d89531b8112af82c448b17929a6e60cbb98566d0f710f39a41f7128
ubuntu@ip-10-1-131-61:/var/fabio$ clear
ubuntu@ip-10-1-131-61:/var/fabio$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae3196de0d89 emilevauge/traefik "/traefik -l DEBUG -c" 35 seconds ago Up 34 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:8080->8080/tcp traefik
2a8e88b7417d gliderlabs/registrator "/bin/registrator con" 11 minutes ago Up 11 minutes registrator
db5148388e1a swarm "/swarm join --advert" 15 hours ago Up 15 hours 2375/tcp swarm-agent
ubuntu@ip-10-1-131-61:/var/fabio$ docker logs traefik
time="2016-06-23T12:55:29Z" level=info msg="Traefik version v1.0.0-rc2 built on 2016-06-08_12:35:41PM"
time="2016-06-23T12:55:29Z" level=info msg="Using TOML configuration file /dev/null"
time="2016-06-23T12:55:29Z" level=debug msg="Global configuration loaded {\"GraceTimeOut\":10,\"Debug\":false,\"AccessLogsFile\":\"\",\"TraefikLogsFile\":\"\",\"LogLevel\":\"DEBUG\",\"EntryPoints\":{\"http\":{\"Network\":\"\",\"Address\":\":80\",\"TLS\":null,\"Redirect\":null}},\"Constraints\":[],\"ACME\":null,\"DefaultEntryPoints\":[\"http\"],\"ProvidersThrottleDuration\":2000000000,\"MaxIdleConnsPerHost\":200,\"Retry\":null,\"Docker\":{\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Endpoint\":\"tcp://10.1.66.229:80\",\"Domain\":\"ci.ukpds.org\",\"TLS\":null},\"File\":null,\"Web\":{\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false},\"Marathon\":null,\"Consul\":null,\"ConsulCatalog\":null,\"Etcd\":null,\"Zookeeper\":null,\"Boltdb\":null,\"Kubernetes\":null}"
time="2016-06-23T12:55:29Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil>}"
time="2016-06-23T12:55:29Z" level=info msg="Starting provider *provider.Docker {\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Endpoint\":\"tcp://10.1.66.229:80\",\"Domain\":\"ci.ukpds.org\",\"TLS\":null}"
time="2016-06-23T12:55:29Z" level=info msg="Starting provider *main.WebProvider {\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false}"
time="2016-06-23T12:55:29Z" level=info msg="Starting server on :80"
time="2016-06-23T12:55:32Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:55:35Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:55:35Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 685.755586ms"
time="2016-06-23T12:55:38Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:55:41Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:55:41Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 1.001316684s"
time="2016-06-23T12:55:44Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:55:47Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:55:47Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 1.682206125s"
time="2016-06-23T12:55:50Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:55:53Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:55:53Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 2.417720421s"
time="2016-06-23T12:55:56Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:55:59Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:55:59Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 2.682907453s"
time="2016-06-23T12:56:02Z" level=debug msg="Docker connection established with docker (API )"
time="2016-06-23T12:56:05Z" level=error msg="Failed to list containers for docker, error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host"
time="2016-06-23T12:56:05Z" level=error msg="Docker connection error An error occurred trying to connect: Get http://10.1.66.229:80/v1.21/containers/json?limit=0: dial tcp 10.1.66.229:80: getsockopt: no route to host, retrying in 5.171155908s"
ubuntu@ip-10-1-131-61:/var/fabio$ curl http://10.1.66.229:80/v1.21/containers/json?limit=0
[{"Id":"ae3196de0d89531b8112af82c448b17929a6e60cbb98566d0f710f39a41f7128","Names":["/ip-10-1-131-61/traefik"],"Image":"emilevauge/traefik","ImageID":"sha256:dbd8c037cd1626336a9d9728fd0a23f9267b5d0249bccf0c334c1ede023bc53a","Command":"/traefik -l DEBUG -c /dev/null --docker --docker.domain=ci.ukpds.org --docker.endpoint=tcp://10.1.66.229:80 --docker.watch --web","Created":1466686529,"Ports":[{"IP":"10.1.131.61","PrivatePort":8080,"PublicPort":8080,"Type":"tcp"},{"IP":"10.1.131.61","PrivatePort":80,"PublicPort":80,"Type":"tcp"}],"Labels":{},"State":"running","Status":"Up 54 seconds","HostConfig":{"NetworkMode":"ci"},"NetworkSettings":{"Networks":{"ci":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"6366782160b272ad152609e516e0d646bf80cb31379d37c110ce3a74642e503d","Gateway":"","IPAddress":"10.1.0.3","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:0a:01:00:03"}}},"Mounts":[]},{"Id":"2a8e88b7417df84dc911f5aaa941ff2c6df1ab73c7a2245d61268306af639e39","Names":["/ip-10-1-131-61/registrator"],"Image":"gliderlabs/registrator","ImageID":"sha256:3b59190c6c800907d7a62c245bf93888db802b00407002fff7e08fed24e5557e","Command":"/bin/registrator consul://consul.ci.ukpds.org","Created":1466685897,"Ports":[],"Labels":{},"State":"running","Status":"Up 11 minutes","HostConfig":{"NetworkMode":"host"},"NetworkSettings":{"Networks":{"host":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"9f8190bf0c4b99d4b6d06c85d835f070056a3563630532e8acd6f6397d6cf454","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":""}}},"Mounts":[{"Source":"/var/run/docker.sock","Destination":"/tmp/docker.sock","Mode":"","RW":true,"Propagation":"rprivate"}]},{"Id":"633d7f71ca74e023fe9660987efdce55f4c5a7a3aa1339793fa56f8b7aa4ab46","Names":["/ip-10-1-69-62/registrator"],"Image":"gliderlabs/registrator","ImageID":"sha256:3b59190c6c800907d7a62c245bf93888db802b00407002fff7e08fed24e5557e","Command":"/bin/registrator consul://consul.ci.ukpds.org","Created":1466629940,"Ports":[],"Labels":{},"State":"running","Status":"Up 15 hours","HostConfig":{"NetworkMode":"host"},"NetworkSettings":{"Networks":{"host":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"5764e076b572ed93db9d3837eddeacd9772a0669ede998c1907ee98e60cbc886","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":""}}},"Mounts":[{"Source":"/var/run/docker.sock","Destination":"/tmp/docker.sock","Mode":"","RW":true,"Propagation":"rprivate"}]}]
ubuntu@ip-10-1-131-61:/var/fabio$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment