0

As in the title, docker only shows dependent container's logs when the service is starting and on the closing. I don't really understand if it's a problem of the .yml file or i set up something badly. the composer is this:

version: '3.10'
services:

  catalog:
    container_name: catalog
    image: catalog_pazienti_v3
    build: 
      context: ./catalog
      dockerfile: Dockerfile
    restart : on-failure
    ports:
      - "8080:8080"
    expose:
      - 8080
    volumes:
      - ./catalog:/catalog

  telegram:
    container_name: telegram
    image: telegrambot
    build: 
      context: ./telegram
      dockerfile: Dockerfile
    restart : on-failure
    depends_on:
      - catalog

  patient_alarm:
    container_name: patient_alarm
    image: patient_alarm
    build: 
      context: ./microservices
      dockerfile: Dockerfile
    restart : on-failure
    depends_on:
      - catalog

  device:
    container_name: Device
    image: device
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    build: 
      context: ./device
      dockerfile: Dockerfile
    restart : on-failure
    depends_on:
      - catalog

I'm trying to change something on the compose or when the build starts but nothing happened

  • That behavior doesn't sound like anything that would be controlled from the Compose file. Do you have a more complete [mcve]? (Consider reducing this to a single service that shows the problem, but include enough code that it could conceivably be run, probably including the Dockerfile and possibly an excerpt from the `main` function.) – David Maze Mar 31 '23 at 10:33
  • You tagged this with "python", and that symptom sounds not unlike [Python app does not print anything when running detached in docker](https://stackoverflow.com/questions/29663459/python-app-does-not-print-anything-when-running-detached-in-docker). – David Maze Mar 31 '23 at 10:34

0 Answers0