Reputation: 41
I am trying to package AWS CloudWatch agent into docker container. The docker build runs into the following error -
Failed to connect to bus: No such file or directory
unknown init system
Here is the snippet from Dockerfile -
FROM ubuntu:16.04
RUN \
apt-get -y update && \
apt-get -y install wget && \
apt-get -y install unzip
RUN \
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip && \
unzip AmazonCloudWatchAgent.zip && \
./install.sh
What is missing or wrong here?
Upvotes: 4
Views: 2450
Reputation: 2471
I noticed that AWS has launched official docker image for the Cloudwatch agent on dockerhub and They are updating it frequently. I am late though, But It may help someone.
https://hub.docker.com/r/amazon/cloudwatch-agent
Upvotes: 1
Reputation: 3737
I notice the documentation has different ways of installing, I wonder if they are both correct. I found another in the EC2 guide that a different method for installing on Ubuntu
RUN \
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O && \
python ./awslogs-agent-setup.py --region us-east-1
Upvotes: 3