'Install AWS configuration from Dockerfile
I am very inexperienced with Docker and AWS.
I have put the following Dockerfile a together and wondered if it has been done the right way to pip install the requirements.txt and to configure AWS using my AWS_Access_Key_ID, AWS_Secret_Access_Key (which I have put in the positions of the code below).
Requirements.txt
boto3
awscli --upgrade --user
Dockerfile
FROM ubuntu:latest
RUN apt install python3 -y
RUN pip install -r requirements.txt
WORKDIR /usr/app/src
COPY consumer.log ./
COPY Kinesis_Ingest.py ./
aws configure
AWS_Access_Key_ID
AWS_Secret_Access_Key
us-east-1
json
CMD["python3","./Kinesis_Ingest.py]
When I run the command
Kinesis_Data_Download>docker build -t my_kinesis_project .
I get the following error
failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 7: unknown instruction: AWS
I am trying to use Docker a bit like Windows Command line prompt
Putting AWS configure command in the Dockerfile and anticipating the next prompts that AWS configure will ask for. The pip install of boot and awscli --upgrade --user in the requirements.txt I am hoping would have made it possible for the docker image environment to connect with AWS.
Please can anyone suggest how the below should be coded?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
