29 lines
854 B
Docker
29 lines
854 B
Docker
FROM python:3.9
|
|
|
|
ENV TZ="Asia/Tokyo"
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY Pipfile Pipfile.lock ./
|
|
RUN \
|
|
apt update -y && \
|
|
# パッケージのセキュリティアップデートのみを適用するコマンド
|
|
apt install -y unattended-upgrades && \
|
|
unattended-upgrades && \
|
|
pip install --upgrade pip wheel setuptools && \
|
|
pip install pipenv --no-cache-dir && \
|
|
pipenv install --system --deploy && \
|
|
pip uninstall -y pipenv virtualenv-clone virtualenv
|
|
|
|
# mysql-clientと必要なパッケージインストール
|
|
RUN apt install -y less vim curl unzip sudo default-mysql-client
|
|
|
|
# aws cli v2 のインストール
|
|
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
RUN unzip awscliv2.zip
|
|
RUN sudo ./aws/install
|
|
|
|
COPY src ./src
|
|
COPY entrypoint.py entrypoint.py
|
|
|
|
CMD ["python", "entrypoint.py"]
|