Forrest logo
back to the docker tool

docker:tldr:a6008

docker: Follow logs for all containers.
$ docker compose logs --follow
try on your machine

The command "docker-compose logs --follow" is used to view the logs of all running services defined in a Docker Compose file, in real-time.

Here's what each part of the command does:

  • "docker-compose" is the Docker Compose executable.
  • "logs" is the sub-command used to view the logs of the specified services.
  • "--follow" flag is used to continuously stream the logs and display new log entries as they occur.

When you run this command, Docker Compose will display the logs of all defined services that are currently running. It will continue to stream and display any new log entries added by the running services in real-time. This can be useful for debugging and monitoring the applications running inside Docker containers.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool