| 1 |
FROM python:3.14-slim |
| 2 |
|
| 3 |
# Install build dependencies for h2 and other packages |
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 5 |
gcc \ |
| 6 |
&& rm -rf /var/lib/apt/lists/* |
| 7 |
|
| 8 |
WORKDIR /app |
| 9 |
|
| 10 |
# Copy the gunicorn source code and install it |
| 11 |
COPY . /gunicorn-src/ |
| 12 |
RUN pip install --no-cache-dir /gunicorn-src/[http2] |
| 13 |
|
| 14 |
# Copy the test application |
| 15 |
COPY tests/docker/http2/app.py /app/app.py |
| 16 |
|
| 17 |
EXPOSE 8443 |
| 18 |
|
| 19 |
CMD ["gunicorn", "app:app", \ |
| 20 |
"--bind", "0.0.0.0:8443", \ |
| 21 |
"--worker-class", "gthread", \ |
| 22 |
"--threads", "4", \ |
| 23 |
"--http-protocols", "h2,h1", \ |
| 24 |
"--certfile", "/certs/server.crt", \ |
| 25 |
"--keyfile", "/certs/server.key", \ |
| 26 |
"--workers", "2", \ |
| 27 |
"--log-level", "debug"] |