Closed mishelen closed 2 months ago
this seems working:
FROM ubuntu:latest as build
RUN apt-get update && \
apt-get install -y ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
RUN curl -O https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/${TARGETARCH:-$(dpkg --print-architecture)}/latest/amazon-cloudwatch-agent.deb && \
dpkg -i -E amazon-cloudwatch-agent.deb && \
rm -rf /tmp/* && \
rm -rf /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard && \
rm -rf /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl && \
rm -rf /opt/aws/amazon-cloudwatch-agent/bin/config-downloader
FROM scratch
COPY --from=build /tmp /tmp
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /opt/aws/amazon-cloudwatch-agent /opt/aws/amazon-cloudwatch-agent
COPY cloudwatch/common-config.toml /etc/cwagentconfig/
COPY cloudwatch/config.json /etc/cwagentconfig/amazon-cloudwatch-agent.json
ENV RUN_IN_CONTAINER="True"
ENTRYPOINT ["/opt/aws/amazon-cloudwatch-agent/bin/start-amazon-cloudwatch-agent"]
but now I have other issue, even .toml
in so called /etc/cwagentconfig/
it is fail with error, looks like this folder is for json
s.
How to provide content of .toml
as environment variables?
This issue was marked stale due to lack of activity.
Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labeled it stalled if you have any questions.
Describe the bug I need CWagent instance to intercept logging via statsD. But I'm struggle just to run it in the container.
Steps to reproduce So I am just reusing image from this repository with few updates
Provided configs:
common-config.toml
amazon-cloudwatch-agent.json
What did you expect to see? I expect to know what happened with launch I expect to set
debug
and see that in details.What did you see instead?
And then it stops silently and immediately without errors. Setting
debug
won't change output. Settingrun_as_user
tocwagent
orroot
or removing it, won't change output. From "secret" conversation there I know thatcommon-config.toml
isn't supported. What's the problem? Plus I wasn't able to find how to provide settings from.toml
tocwagent
.You probable noticed commented
Even I need to use them, but then I got even more problems how to setup that:
I want know clear way how to setup container. Which directories and files should be used, and why it ignores default directories.
What version did you use? latest
What config did you use? see above
Environment
ubuntu:latest
Additional context Add any other context about the problem here.