Docker gelf log driver - Invalid reference format

861 views Asked by At

I am trying to start a docker container and make use the gelf log driver. I run what is in the docs:

docker run --log-driver gelf --log-opt gelf-address udp://127.0.0.1:12201 hello-world

But that returns:

docker: invalid reference format.

What am I doing wrong? Can't find any example of how to format the parameters.

1

There are 1 answers

0
Jan Garaj On

= is missing in your log-opt:

docker run \
  --log-driver gelf \
  --log-opt gelf-address=udp://127.0.0.1:12201 \
  hello-world

Doc: https://docs.docker.com/config/containers/logging/gelf/#usage