I recently pulled out a nginx image:
docker pull nginx
I can run it successfully and go to http: // server_name and see the "Welcome to Nginx" page:
docker run -d -p 80:80 nginx
But when I try to check the logs:
docker exec 6c79549e3eb4f6e5fc06f049b67814ac4560ce2cdd7cc6ae84b44b5ae09a9a05 cat /var/log/nginx/access.log
It just hangs and displays nothing. Same thing with the error log. Now, if I create the test.txt file in the same folder and use docker exec to (view) the cat file, I execute without any freezes or any problems.
Even if I try to run it interactively, it just freezes:
docker run -i -t -p 80:80 nginx
Again, the terminal hangs on the next line, doing nothing, but it seems to work because I can access the nginx welcome page.
Actually, I got confused about what was going on, I tried to find this problem, but have not yet found a solution. Unable to view the logs, debugging them is quite difficult :) Also, do not move the access logs to stdout in the nginx container, because using the container of the agreement containers before entering standard output?
docker nginx hang cat
alexfvolk
source share