gunicorn/tests/docker/http2/Dockerfile.gunicorn
Benoit Chesneau 780e2cf055 Add HTTP/2 tests
Unit tests for HTTP/2 implementation:
- test_http2_stream.py: Stream state management tests
- test_http2_request.py: Request interface tests
- test_http2_connection.py: Connection handling tests
- test_http2_async_connection.py: Async connection tests
- test_http2_config.py: Configuration tests
- test_http2_alpn.py: ALPN negotiation tests
- test_http2_errors.py: Error handling tests
- test_http2_integration.py: Integration tests

Docker integration tests:
- Full HTTP/2 testing environment with nginx proxy
- Direct connection tests and proxy tests
- Concurrent stream tests
- Protocol behavior tests
- Error handling tests
- Header handling tests
- Performance tests
2026-01-27 09:57:32 +01:00

28 lines
710 B
Docker

FROM python:3.12-slim
# Install build dependencies for h2 and other packages
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the gunicorn source code and install it
COPY . /gunicorn-src/
RUN pip install --no-cache-dir /gunicorn-src/[http2]
# Copy the test application
COPY tests/docker/http2/app.py /app/app.py
EXPOSE 8443
CMD ["gunicorn", "app:app", \
"--bind", "0.0.0.0:8443", \
"--worker-class", "gthread", \
"--threads", "4", \
"--http-protocols", "h2,h1", \
"--certfile", "/certs/server.crt", \
"--keyfile", "/certs/server.key", \
"--workers", "2", \
"--log-level", "debug"]