1

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.

tgogos
  • 23,218
  • 20
  • 96
  • 128
AlexanderNajafi
  • 1,631
  • 2
  • 25
  • 39

1 Answers1

1

= 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

Jan Garaj
  • 25,598
  • 3
  • 38
  • 59