Welcome! Log In Create A New Profile

Advanced

Logs sent to stdout in docker but seeing old logs where are they coming from?

Posted by anagio 
Logs sent to stdout in docker but seeing old logs where are they coming from?
April 13, 2016 03:36PM
I have NGINX setup in a docker container which configures NGINX access logs to stdout with this

RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log

When the container is built I see access logs scroll across my terminal from late last year until it reaches today. At which point anytime I hit my server I see the new output of the logs in my terminal.

I SSHed into the container and checked for any old log files in /var/* but cannot find any. It seems as if logs are being stored somewhere in the container.

Where can I check for the old logs to clear them out. I'd like to delete them because starting and stopping the container makes my terminal scroll for 5-10 minutes worth of logs.Is there any caching / buffering of logs which I can clear some how. I've searched the entire container for strings within the logs but cannot find them.

Any help is appreciated

Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 43
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready