How to see the logs for a docker compose image that is launched from a Github Workflow

I am running a docker compose image, docker compose up -d, from a github workflow. A custom service should start up in that container, but appears to be failing, which then causes the docker container to shutdown a few seconds after starting up (I use docker ps to see the process running, but then a few seconds later it is no longer running).

How can I see the logs or terminal of my docker image from the github workflow so I can figure out what’s going wrong?

You can’t see logs of an image. The image is the “template” at rest, You mean the container log.

The solution should be as easy as not start the containers detached? Instead of docker compose up -d, just use docker compose up.

1 Like