Reputation: 437
I have to start kinesis agent on EKS cluster using Dockerfile. Docker is able to build an image and deployed successfully. But kinesis-agent is not started. Here is my Dockerfile:
FROM amazonlinux
WORKDIR /app/
ADD . /app/
RUN yum install -y aws-kinesis-agent which findutils
RUN cp /app/src/resources/agent.json /etc/aws-kinesis/agent.json
RUN cat /etc/aws-kinesis/agent.json
RUN cp /app/src/resources/log4j.xml /etc/aws-kinesis/log4j.xml
RUN cat /etc/aws-kinesis/log4j.xml
RUN mkdir -p /tmp/aws_kinesis_agent
CMD ["start-aws-kinesis-agent"]
CMD ["sh", "-c", "python3.9 /app/src/main.py || exit 1"]
However when somebody logins to the container and starts kinesis-agent from the terminal using above command, it gets started.
Can anyone help me on this?
Upvotes: 0
Views: 51
Reputation: 437
i needed to run following command before starting the kinesis-agent:
RUN chkconfig aws-kinesis-agent on
And it worked fine.
Upvotes: 0