Skip to content

[Docker] "Unknown port" from second docker instance #100

@ghost

Description

Hello,

I am running two docker containers for dev and prod, from docker-compose:

version: "3.6"
services:
  azure-metrics-exporter_dev:
    image: robustperception/azure_metrics_exporter
    network_mode: host
    restart: always
    command:
    - '--config.file=/config/dev.yaml'
    volumes:
    - "/azure-metrics-exporter/config:/config:rw"
  azure-metrics-exporter_prod:
    image: robustperception/azure_metrics_exporter
    network_mode: host
    restart: always
    command:
    - '--config.file=/config/prod.yaml'
    - '--web.listen-address=":9275"'
volumes:
    - "/azure-metrics-exporter/config:/config:rw"

Metrics looks good from dev in localhost:9276/metrics , but second docker is restarting all the time. Docker logs output:

azure-metrics-exporter# docker logs b9d7asdecbd0
2021/04/01 10:31:25 azure_metrics_exporter listening on port ":9275"
2021/04/01 10:31:25 Error starting HTTP server: listen tcp: address tcp/9275": unknown port

It looks that is not able to read port. But in docker-compose.yaml I am using command:
- '--web.listen-address=":9275"'

Tested with separated config and SPNs for subscription

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