FROM python:3.9

ENV WORKDIR /function/
ENV TZ="Asia/Tokyo"
WORKDIR ${WORKDIR}

COPY Pipfile Pipfile.lock ${WORKDIR}
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
COPY check-view-option ./

ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
CMD [ "main.handler" ]
