File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 11FROM amazonlinux:2
22
33RUN yum install -y java-1.8.0-openjdk.x86_64 &&\
4- yum install -y amazon-linux-extras &&\
5- amazon-linux-extras install python3 &&\
4+ yum install -y python3.x86_64 &&\
65 yum install -y git &&\
7- pip3 install amazon_kclpy
6+ python3 -m pip install amazon_kclpy
87
98RUN git clone --depth 1 --branch v2.0.1 https://github.com/awslabs/amazon-kinesis-client-python /kclpy &&\
109 mv /kclpy/amazon_kclpy / &&\
1110 mkdir -p app/logs &&\
12- mv /kclpy/samples/amazon_kclpy_helper.py /app &&\
11+ mv /kclpy/samples/amazon_kclpy_helper.py /usr/bin &&\
1312 rm -rf /kclpy
1413
15- COPY record_processor.properties record_processor.py setup.py logback.xml run.sh set_properties.py /app /
14+ COPY record_processor.properties record_processor.py setup.py logback.xml run.sh set_properties.py /usr/bin /
1615
17- RUN python3 app /setup.py install &&\
18- chmod 755 /app/run.sh
16+ RUN python3 /usr/bin /setup.py install &&\
17+ chmod 777 /usr/bin
1918
2019
21- ENTRYPOINT ["sh" , "./app /run.sh" ]
20+ ENTRYPOINT ["sh" , "/usr/bin /run.sh" ]
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
1+ #!/usr/bin/python3
22
33# Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44# SPDX-License-Identifier: MIT-0
Original file line number Diff line number Diff line change 11#! /bin/sh
2- python3 app/set_properties.py
3- ` python3 /usr/bin/amazon_kclpy_helper.py --print_command --java /usr/bin/java --properties app/record_processor.properties --log-configuration app/logback.xml` &
2+ python3 /usr/bin/set_properties.py
3+ chmod 777 /usr/bin/record_processor.py
4+ ` python3 /usr/bin/amazon_kclpy_helper.py --print_command --java /usr/bin/java --properties /usr/bin/record_processor.properties --log-configuration /usr/bin/logback.xml` &
45touch /app/logs/record_processor.log
56exec tail -f /app/logs/record_processor.log
Original file line number Diff line number Diff line change 66
77import os
88
9- with open ('app /record_processor.properties' , 'r' ) as file :
9+ with open ('/usr/bin /record_processor.properties' , 'r' ) as file :
1010 filedata = file .read ()
1111 filedata = filedata .replace ('AWS_REGION' , os .environ ['REGION' ])
1212 filedata = filedata .replace ('STREAM_NAME' , os .environ ['STREAM_NAME' ])
1313 filedata = filedata .replace ('APPLICATION_NAME' , os .environ ['APPLICATION_NAME' ])
1414
15- with open ('app /record_processor.properties' , 'w' ) as file :
15+ with open ('/usr/bin /record_processor.properties' , 'w' ) as file :
1616 file .write (filedata )
You can’t perform that action at this time.
0 commit comments