feat:DockerFileを作成したため、DockerFile資材を追加した
This commit is contained in:
parent
3558564def
commit
787cacf431
10
ecs/Dockerfile/Dockerfile
Normal file
10
ecs/Dockerfile/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM python:3.9
|
||||
|
||||
ENV TZ="Asia/Tokyo"
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY main.py ./
|
||||
|
||||
CMD [ "python", "./main.py" ]
|
||||
19
ecs/Dockerfile/main.py
Normal file
19
ecs/Dockerfile/main.py
Normal file
@ -0,0 +1,19 @@
|
||||
import boto3
|
||||
import os
|
||||
from os import path
|
||||
|
||||
# EVENT_BUCKET = os.environ["EVENT_BUCKET"]
|
||||
# EVENT_OBJECKT_KEY = os.environ["EVENT_OBJECKT_KEY"]
|
||||
|
||||
# DESTINATION_BUCKET = os.environ["DESTINATION_BUCKET"]
|
||||
# DESTINATION_OBJECKT_DIR = os.environ["DESTINATION_OBJECKT_DIR"]
|
||||
|
||||
# s3 = boto3.resource("s3")
|
||||
|
||||
# destination_object_key = path.join(
|
||||
# DESTINATION_OBJECKT_DIR, path.basename(EVENT_OBJECKT_KEY)
|
||||
# )
|
||||
# event_object = s3.Object(DESTINATION_BUCKET, destination_object_key)
|
||||
# event_object.copy({"Bucket": EVENT_BUCKET, "Key": EVENT_OBJECKT_KEY})
|
||||
|
||||
print('呼び出し成功')
|
||||
1
ecs/Dockerfile/requirements.txt
Normal file
1
ecs/Dockerfile/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
boto3
|
||||
Loading…
x
Reference in New Issue
Block a user