0

I have written a Qt application which logs to console via qDebug(). When run inside a docker container, the application logs are visible as normal. But when the same docker image is run via docker-compose up, there is no output visible at all. How does this come?

Edit:

The output is not visible either, if I try to view it via docker logs in the following way:

docker run -d --rm -name test test-image
docker logs test

Working:

docker run -it --rm test-image
4

1 回答 1

2

I finally found a solution. My docker run was missing the -t flag:

docker run -it --rm -t test-image

The equivalent option for the docker-compose config is:

tty: true

Hope this is helpfull to someone.

于 2019-06-14T12:04:46.720 回答