This is a lightweight docker container that runs the Cloudwatch Logs agent. It is built on gliderlabs/alpine to be as minimal as possible.
Because the cloudwatch logs agent seems to only be downloadable from an EC2 instance, this container can only be built on EC2.
$ docker build -t howgood/cloudwatch .-
Create a log configuration file, using the configuration options documented here.
-
Run the container with your configuration file mounted into the container, and pass it as an option:
$ docker run \ --volume=/path/to/my-cloudwatch.conf:/etc/cloudwatch/awslogs.conf:ro \ howgood/cloudwatch \ push --config-file /etc/cloudwatch/awslogs.conf
The default configuration file that Amazon provides is included as an example.