[AWS][Log]Docker输出日志

[AWS][Log]Docker输出日志

Fargate, 想输出固定日志到cloudwatch,参考了
An amazing recipe is given in the nginx Dockerfile:

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

Simply, the app can continue writing to it as a file, but as a result the lines will go to stdout & stderr!

Docker官方
Docker: View logs for a container or service

Subscribe to 隅

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe