How do you disiplay logs of a service my-service that is running based on a Docker Compose file?
Experience Level: Junior
Tags: Docker Compose
Answer
Run the following command:
docker compose logs my-service
Related Docker Compose job interview questions
How do you restart a service my-service that is either stopped or runs as part of Docker Compose?
Docker Compose JuniorHow do you restart all stopped and running Docker Compose services?
Docker Compose JuniorHow do you disiplay logs of all services that are running based on a Docker Compose file?
Docker Compose JuniorHow do you display a Docker Compose commands that can be executed?
Docker Compose JuniorHow do you display a Docker Compose version that is currently installed?
Docker Compose Junior