Prometheus container does not run

53 views
Skip to first unread message

Anauê Curi

unread,
Mar 23, 2021, 8:30:05 PM3/23/21
to Prometheus Users
Hi everyone,

I'm trying to run prometheus via a container in docker, but after run it the container status moves to created instead running.

Docker-compose:

version: '3.2'

services:

  prometheus:

    image: prom/prometheus

    ports:

      - "9090:9090"

    volumes:

      - prometheus:/prometheus

      - ./targets/:/targets

      - ./configs/prometheus.yml:/etc/prometheus/prometheus.yml

    restart: always

    command:

      - '--config.file=/etc/prometheus/prometheus.yml'

    networks:

      - agent_network

    deploy:

      placement:

        constraints:

          - node.role==manager 

volumes:

  prometheus:


----

After build it:

ab0980ccafb7   prom/prometheus                           "/bin/prometheus --c…"   25 hours ago   Created       0.0.0.0:9090->9090/tcp                     brave_villani

---

Do you have any idea what is going wrong?

Thank you.

Laurent Dumont

unread,
Mar 24, 2021, 1:41:53 AM3/24/21
to Anauê Curi, Prometheus Users
What docker-compose command are you using? You need to use "docker-compose up" to actually build + start the container.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/160a31f5-7302-4f99-9628-a642834439b8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages