I have been installing SSH in the Debian Docker. Since I wanted to have some extra log, I also installed the Rsyslog as described in this question.

Result was that some extra logs are created e.g. auth.log (to see who logged in). To look into this log, I have to install vi or nano in the container and look at it in the container.

Question is now: can I somehow add this auth.log or other logs to the Docker log? So I can just look at the log in Portainer, instead of having to go in the console mode of the container?

  • What you're asking for is called combining logs - this is discouraged - stackoverflow.com/questions/39626579/…. – slm Apr 15 at 13:56
  • The installation of SSH in your Docker container is also something that's discouraged. Is your Dockerfile somewhere that we could take a look at it? – slm Apr 15 at 13:57
  • Hello, Thanks for your info. I am not combining logs. At this moment the debian docker is not giving me any log at all.... I am installing this SSH so I can have a very specific SFTP server, which serves my purposes (installing is done in the dockerfile). I am not using it to log into the container, as is discouraged. My question is: how can I add any log into the docker log. I do not have the dockerfile somewhere. – lseg Apr 16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.