2

I am running cAdvisor using the following code as instructed here:

sudo docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:ro \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --volume=/dev/disk/:/dev/disk:ro \
  --publish=8080:8080 \
  --detach=true \
  --name=cadvisor \
  google/cadvisor:latest

I need to pass the following flag to cAdvisor as suggested in this answer:

--enable_load_reader=true

How do I pass that flag to cAdvisor?

Enrique
  • 9,920
  • 7
  • 47
  • 59

1 Answers1

1

The google/cadvisor container behaves like the binary itself, therefore you can just append the option to the end of the docker run ... command. You would also like to add the --net host option to your docker run command as noted here:

sudo docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:ro \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --volume=/dev/disk/:/dev/disk:ro \
  --publish=8080:8080 \
  --detach=true \
  --net host \
  --name=cadvisor \
  google/cadvisor:latest \
    --enable_load_reader=true
Luca
  • 11
  • 1