This repository was archived by the owner on Apr 3, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.builder
More file actions
120 lines (92 loc) · 2.49 KB
/
Dockerfile.builder
File metadata and controls
120 lines (92 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Multi-purpose builder image for HyperCode project
# This image can be used for builds, tests, and CI/CD pipelines
FROM python:3.14-slim as base
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js (for any JS tooling)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install common Python tools
RUN pip install --no-cache-dir \
pip-tools \
wheel \
setuptools \
twine
WORKDIR /workspace
# ==================== Development Stage ====================
FROM base as development
# Install development tools
RUN pip install --no-cache-dir \
pytest \
pytest-cov \
pytest-asyncio \
pytest-mock \
black \
ruff \
mypy \
ipython \
debugpy \
pre-commit
# Install Docker CLI for Docker-in-Docker scenarios
RUN curl -fsSL https://get.docker.com | sh
CMD ["/bin/bash"]
# ==================== Testing Stage ====================
FROM development as testing
# Install additional test dependencies
RUN pip install --no-cache-dir \
faker \
factory-boy \
hypothesis \
responses \
freezegun \
pytest-xdist \
pytest-timeout
# Install performance testing tools
RUN npm install -g artillery
WORKDIR /tests
CMD ["pytest", "-v"]
# ==================== CI Stage ====================
FROM development as ci
# Install CI/CD specific tools
RUN pip install --no-cache-dir \
coverage[toml] \
pytest-html \
pytest-json-report \
bandit \
safety
# Install code quality tools
RUN npm install -g \
eslint \
prettier \
@commitlint/cli
# Install container scanning
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
WORKDIR /ci
CMD ["/bin/bash"]
# ==================== Documentation Builder ====================
FROM base as docs
# Install documentation tools
RUN pip install --no-cache-dir \
mkdocs \
mkdocs-material \
mkdocstrings[python] \
mkdocs-gen-files \
mkdocs-literate-nav \
mkdocs-section-index
WORKDIR /docs
CMD ["mkdocs", "serve", "--dev-addr=0.0.0.0:8000"]
# ==================== Database Migration ====================
FROM base as migration
# Install Prisma and migration tools
RUN pip install --no-cache-dir \
prisma \
alembic \
sqlalchemy
WORKDIR /migrations
CMD ["prisma", "migrate", "deploy"]