zero-check-pipeline/templates/Dockerfile

36 lines
817 B
Docker

# Zero-Check Container Verification Template
# Copy this into your project and adjust as needed.
#
# Usage:
# docker build -t project-verify .
# docker run --rm project-verify
# --- Python Projects ---
FROM python:3.12-slim AS python-verify
WORKDIR /app
COPY requirements*.txt pyproject.toml* ./
RUN pip install --no-cache-dir -r requirements.txt 2>/dev/null \
|| pip install --no-cache-dir . 2>/dev/null \
|| echo "No Python dependencies to install"
COPY . .
RUN pip install pytest pytest-cov
CMD ["pytest", "--cov", "--cov-report=term-missing", "-q"]
# --- Go Projects ---
# Uncomment this block and comment out the Python block above
#
# FROM golang:1.22-alpine AS go-verify
#
# WORKDIR /app
#
# COPY go.mod go.sum* ./
# RUN go mod download
#
# COPY . .
#
# CMD ["go", "test", "-cover", "./..."]