A fully built version of gliderlabs/logspout simplified for quick launch (size: 13.62MB)
422
A fully built version of gliderlabs/logspout simplified for quick launch. This will ship all Docker logs on a host to a remote syslog, Logstash, ELK or redis endpoint.
The remote location is service://ip_or_hostname:port which you can specify in the command, here I use a redis endpoint:
docker run -d -p 8000:8000 -v=/var/run/docker.sock:/tmp/docker.sock philcryer/logspout redis://10.0.0.8:6379
Or define it in an ENV variable:
export logspout_out="redis://10.0.0.8:6379" && docker run -d -p 8000:8000 -v=/var/run/docker.sock:/tmp/docker.sock philcryer/logspout $logspout_out
You can see it working, and that it has the correct route to your endpoint, using curl:
$ curl localhost:8000/routes
[
{
"id": "6678611840d0",
"target": {
"type": "redis",
"addr": "10.0.0.8:6379"
}
}
]
In production I'd recommend not exposing that port for security reasons, and since you won't need it. Example:
docker run -d -v=/var/run/docker.sock:/tmp/docker.sock philcryer/logspout redis://10.0.0.8:6379
To pull and run the container now takes only ~2 seconds:
$ time docker run -d -p 8000:8000 -v=/var/run/docker.sock:/tmp/docker.sock philcryer/logspout redis://10.0.0.8:6379
Unable to find image 'philcryer/logspout:latest' locally
Pulling repository philcryer/logspout
550cc8793fba: Download complete
511136ea3c5a: Download complete
1275afa3ee0d: Download complete
2efd6d3097de: Download complete
463bee06b043: Download complete
24a06a523d61: Download complete
c2e2cce8c3a2: Download complete
e8d7add2be0a: Download complete
c620b2fad547: Download complete
Status: Downloaded newer image for philcryer/logspout:latest
f9127d430fa0e9fc037adccc1175802adae27c1a87bde7c416737b3cc206570e
real 0m2.013s
user 0m0.010s
sys 0m0.001s
\o/
Content type
Image
Digest
sha256:8a293b50d…
Size
4.5 MB
Last updated
almost 11 years ago
docker pull philcryer/logspout