docker -H :4000 events | ./docker_events.py
docker -H :4000 events
will gives the events continuously until we press Crtl+C
. So, I pipe
the output to my custom script docker_events.py
which parses the output which was returned by docker -H :4000 events
and then gives it own version of output (actually it will send json data to redis
!)
I inclued the above line in supervisord
.conf
like below
[program:docker_events]
command=docker -H :4000 events | python /root/docker_events.py
autostart=true
autorestart=true
stderr_logfile=/var/log/docker_events.err.log
stdout_logfile=/var/log/docker_events.out.log
but it is not working properly; I can see error in docker_events.err.log
Usage: docker events [OPTIONS]
Get real time events from the server
docker: "events" requires 0 arguments.
See 'docker events --help'.
It is taking |
as argument. So can I resolve this issue?