スリム化の実施とPipfile及びPipfile.lockの再構成
This commit is contained in:
parent
377b260c05
commit
5911220f9a
@ -1,16 +1,19 @@
|
||||
FROM python:3.9
|
||||
# AWS公式のDockerイメージを利用
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
ENV TZ="Asia/Tokyo"
|
||||
|
||||
WORKDIR /function
|
||||
COPY requirements.txt ./
|
||||
RUN \
|
||||
apt update -y && \
|
||||
# パッケージのセキュリティアップデートのみを適用するコマンド
|
||||
apt install -y unattended-upgrades && \
|
||||
unattended-upgrades && \
|
||||
pip install --upgrade pip wheel setuptools && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
# pythonの標準出力をバッファリングしないフラグ
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
# pythonのバイトコードを生成しないフラグ
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# 必要なファイルをイメージにコピー
|
||||
COPY Pipfile Pipfile.lock ./
|
||||
|
||||
RUN pip install pipenv --no-cache-dir && \
|
||||
pipenv install --system --deploy && \
|
||||
pip uninstall -y pipenv virtualenv-clone virtualenv
|
||||
COPY datadecrypt ./
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/python", "-m", "awslambdaric" ]
|
||||
|
||||
16
lambda/sap-data-decrypt/Pipfile
Normal file
16
lambda/sap-data-decrypt/Pipfile
Normal file
@ -0,0 +1,16 @@
|
||||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
boto3 = "*"
|
||||
awslambdaric = "*"
|
||||
python-gnupg = "*"
|
||||
|
||||
[dev-packages]
|
||||
autopep8 = "*"
|
||||
flake8 = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.12"
|
||||
27
lambda/sap-data-decrypt/Pipfile.lock
generated
Normal file
27
lambda/sap-data-decrypt/Pipfile.lock
generated
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "1a02067c1f004e5d31364e9631ef0cefbe083f9c667e82317ebda4bda9b2133e"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.12"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"awslambdaric": "*",
|
||||
"boto3": "*",
|
||||
"python-gnupg": "*"
|
||||
},
|
||||
"develop": {
|
||||
"autopep8": "*",
|
||||
"flake8": "*"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user