I have issue run container

i have python app and i would Dockerfile writing but i have this issue : docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: “.”: executable file not found in $PATH: unknown.

could somebody help me what issue a have

FROM python:alpine

#RUN pip install boto3
#RUN pip install DateTime

COPY . /app
WORKDIR /app

CMD  python , ./s3.py 
import boto3

from datetime import datetime

# get current date and time
current_datetime = datetime.now()
print("Current date & time : ", current_datetime)

# convert datetime obj to string
str_current_datetime = str(current_datetime)

# create a file object along with extension
file_name = str_current_datetime+"_task.txt"
file = open(file_name, 'w+').write('Hello world!')

s3 = boto3.resource('s3')
s3.Bucket('qa-mehmetfatihyasar-stormreply-platform-challenge').upload_file(file_name ,file_name)
s3.Bucket('staging-mehmetfatihyasar-stormreply-platform-challenge').upload_file(file_name ,file_name)

I am not sure what you wanted to do but the CMD instruction should have been this way:

CMD  ["python", "./s3.py"] 
1 Like