Docker Community Forums

Share and learn in the Docker community.

The Logs of a Gitolite Container

(Flavius) #1


I’ve got a docker container serving git repositories with the help of gitolite. The main process of the container is of course sshd.

I’ve instructed sshd to log to stdout / stderr, and as I understand, docker will get that output and log it. Perfect.

The other problem remains: gitolite itself also logs some interesting events, which I’d also like to get out of docker.

  1. Is it possible to get those logs displayable by docker logs? I mean twofold:
    a. in practice, with the latest version of docker?
    b. in theory, if point 1 is not possible, what refactorings would be required? Beside that of making gitolite itself run sshd and output both sshd’s logs, as well as its own logs - which I can already image it could work
  2. What are best practices and tools in the docker ecosystem, beside mounthing a volume with the directory containing the logs directory of gitolite and getting the logs into a third party tool?

Regarding point 1, what I actually need in terms of “business value” are logs which are not “out of sync”, for security purposes, easier analysis, accountability, etc. The logs of sshd and the logs of gitolite should go hand in hand. I realise I could improvise, the question is how docker helps reduce the amount of improvisation in this scenario.

The scenario is applicable to many other setups, gitolite being just a use-case.