-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (37 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
43 lines (37 loc) · 1.35 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
# Rusha base Python image
#
# Provides: Python 3.11-slim with common FastAPI/SQLAlchemy deps pre-installed.
# Pre-installing common deps here means customer builds only need to install
# their app-specific extras on top (faster CI builds, smaller diffs).
#
# Usage in your project Dockerfile:
#
# FROM ghcr.io/rusha-corp/base-image-python:latest
# COPY requirements.txt .
# RUN pip install --no-cache-dir -r requirements.txt # app-specific extras only
# COPY . .
# EXPOSE 8000
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
FROM python:3.11-slim
WORKDIR /app
# Runtime system deps (no compilers — keep the image small)
RUN apt-get update && apt-get install -y --no-install-recommends \
libpq5 \
&& rm -rf /var/lib/apt/lists/*
# Pre-install common Rusha Python stack
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
fastapi==0.115.0 \
"uvicorn[standard]==0.30.0" \
sqlalchemy==2.0.35 \
psycopg2-binary==2.9.9 \
alembic==1.13.3 \
pydantic==2.9.0 \
pydantic-settings==2.5.0 \
"python-jose[cryptography]==3.3.0" \
"passlib[bcrypt]==1.7.4" \
python-multipart==0.0.12
# Emit logs to stdout (kubectl logs friendly)
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]