Skip to content

cadvisor dockerfile healthchecks do not utilize correct port if --port command is used to change from default 8080 #3618

@JerrettDavis

Description

@JerrettDavis

The Dockerfile utilizes a static port 8080 for the healthcheck and expose operations:

ENV CADVISOR_HEALTHCHECK_URL=http://localhost:8080/healthz

If a non-default port is utilized, users have to explicitly set the CADVISORT_HEALTHCHECK_URL environment variable to reflect the updated port otherwise the status will remain "unhealthy".

  cadvisor:
    image: gcr.io/cadvisor/cadvisor:latest
    container_name: cadvisor
    command:
      - '-port=9092'
    expose:
      - 9092
    ports:
      - 9092:9092
    environment:
      - 'CADVISOR_HEALTHCHECK_URL=http://localhost:9092/healthz'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions