lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

PostgreSQL container logs not displayed

Open Tset-Noitamotua opened this issue 6 years ago • 10 comments

Describe the bug Logs of a customized PostgreSQL container I use are not displayed

To Reproduce Steps to reproduce the behavior:

  1. docker run --name ehrdb -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 rippleosi/ethercis-database-docker
  2. start lazydocker as container
  3. check Logs of ehrdb container - they are empy

Expected behaviour Expected to see same logs that I get from following command

> docker container logs ehrdb 

# example output
2019-09-11 06:27:48.178 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-09-11 06:27:48.178 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2019-09-11 06:27:48.180 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-09-11 06:27:48.191 UTC [18] LOG:  database system was shut down at 2018-10-24 08:54:17 UTC
2019-09-11 06:27:48.193 UTC [1] LOG:  database system is ready to accept connections

Screenshots image

Desktop (please complete the following information):

  • OS: Linux (Deepin 15.11 - kernel 5.0)
  • Lazydocker Version v0.7.4

Additional context I Also tried starting ehrdb container from a customcommand for images from inside lazydocker, same behavior as described above.

Tset-Noitamotua avatar Sep 11 '19 06:09 Tset-Noitamotua

Does this happen with other contains too?

mjarkk avatar Sep 11 '19 07:09 mjarkk

Running lazydocker in Docker container won't give you logs or CPU usage. Known bug.

dawidd6 avatar Sep 11 '19 07:09 dawidd6

@dawidd6 Is this just impossible due to files outside of the docker container?
Because if so we could better just remove this logs tab from the docker container.

mjarkk avatar Sep 11 '19 07:09 mjarkk

Honestly I have no idea why it does not work in Docker. We have docker binary in image and yet it refuses to show logs, but other stuff is working.

dawidd6 avatar Sep 11 '19 07:09 dawidd6

Ow i see this is indeed wired,
when i run docker:dind with the docker sock mounted it shows the logs just fine.

docker run \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -it --rm docker:dind sh

/ # docker logs redis

mjarkk avatar Sep 11 '19 08:09 mjarkk

Yep, docker will show logs, but lazydocker not. Guess it becomes lazier in Docker.

dawidd6 avatar Sep 11 '19 08:09 dawidd6

Running lazydocker in Docker container won't give you logs or CPU usage. Known bug.

confirm, running "normally" installed lazydocker displays logs as expected

image

Tset-Noitamotua avatar Sep 11 '19 09:09 Tset-Noitamotua

Added a notice about this: https://github.com/jesseduffield/lazydocker/commit/ef1b2b57b0e17b1635421cc40dfa54f2acf788e6

dawidd6 avatar Sep 11 '19 09:09 dawidd6

Any news about why this happens?

facorazza avatar May 11 '20 08:05 facorazza

Any progress on this front? This is sort of a blocker for docker installations.

jschneekloth avatar Jan 01 '24 16:01 jschneekloth