[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