27 lines
637 B
Docker
27 lines
637 B
Docker
FROM python:3.9-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# GPGキーの更新とパッケージのインストール
|
|
RUN apt-get update --allow-insecure-repositories && \
|
|
apt-get install -y --allow-unauthenticated python3-dev libpq-dev postgresql-client && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Pythonパッケージのインストール
|
|
COPY requirements.txt .
|
|
COPY setup.py .
|
|
COPY README.md .
|
|
COPY . .
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 開発用パッケージのインストール
|
|
RUN pip install --no-cache-dir --upgrade pip \
|
|
pytest \
|
|
pytest-cov \
|
|
flake8
|
|
|
|
# パッケージのインストール
|
|
RUN pip install -e .
|
|
|