Sign inSign up

jas0n0ss/tengine

By jas0n0ss

•Updated over 1 year ago

tengine web server

Image
Web servers
0

153

jas0n0ss/tengine repository overview

This is a multi-platform Docker image for Tengine v3.1.0⁠, built on Alpine Linux. It integrates jemalloc, supports HTTPS, HTTP/2, stream proxy, and various performance and security modules. Ideal for high-performance reverse proxy and load balancing scenarios.


⁠Image Tags

  • Tengine 3.1.0 with support for both amd64 and arm64 architectures

⁠Features

  • Based on Alpine 3.19: small footprint, fast startup, and secure
  • Integrated jemalloc for improved memory allocation performance
  • Enabled multithreading and async file I/O
  • Full support for HTTPS (OpenSSL) and HTTP/2
  • Rich set of HTTP modules: realip, auth_request, slice, etc.
  • Support for TCP/UDP traffic forwarding (stream module)
  • Runs as a non-root user for enhanced security
  • Built-in health check endpoint: /status

⁠Build Configuration

./configure \
    --prefix=/opt/tengine \                      # Install path
    --with-jemalloc \                            # High-performance memory allocator
    --with-threads \                             # Thread pool support
    --with-file-aio \                            # Asynchronous file I/O
    --with-http_ssl_module \                     # HTTPS (SSL/TLS)
    --with-http_v2_module \                      # HTTP/2 protocol
    --with-http_realip_module \                  # Preserve real client IP behind proxies
    --with-http_stub_status_module \             # Monitoring endpoint
    --with-http_gzip_static_module \             # Serve pre-compressed .gz files
    --with-pcre-jit \                            # Faster regex handling
    --with-http_auth_request_module \            # External authentication support (e.g., SSO)
    --with-http_slice_module \                   # Efficient large file delivery
    --with-http_secure_link_module \             # Secure link (anti-leech)
    --with-http_addition_module \                # Add content to responses
    --with-http_degradation_module \             # Graceful degradation under high load
    --with-stream \                              # TCP/UDP reverse proxy
    --with-stream_ssl_module \                   # Stream SSL support
    --with-stream_realip_module \                # Preserve real IP in stream mode
    --with-stream_ssl_preread_module             # SSL preread for SNI-based routing
⁠Pull the image
# For ARM64
docker pull jas0n0ss/tengine:arm64

# For AMD64
docker pull jas0n0ss/tengine:amd64

⁠Run the container
docker run -d \
  -p 80:80 -p 443:443 \
  --name tengine \
  jas0n0ss/tengine:arm64

⁠Mount your custom config
# With docker run
docker run -d \
  -p 80:80 -p 443:443 \
  -v /path/to/nginx.conf:/opt/tengine/conf/nginx.conf:ro \
  -v /path/to/conf.d:/opt/tengine/conf/conf.d:ro \
  --name tengine \
  jas0n0ss/tengine:amd64
# With docker-compose
version: '3.8'
services:
  tengine:
    image: jas0n0ss/tengine:amd64
    container_name: tengine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/opt/tengine/conf/nginx.conf:ro
      - ./conf.d:/opt/tengine/conf/conf.d:ro
      - ./logs:/opt/tengine/logs
      - ./cache:/var/cache/nginx
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/status"]
      interval: 30s
      timeout: 5s
      retries: 3

⁠Health Check

The image includes a built-in health check at http://localhost/status, ensuring the service is running correctly.


⁠Build Details

  • Compiled from official Tengine v3.1.0 source with popular modules enabled
  • jemalloc 5.3.0 integrated for optimized memory handling
  • Multi-architecture support: amd64 and arm64
  • Lightweight and secure: built on Alpine Linux with minimal dependencies

Tag summary

Content type

Image

Digest

sha256:4c289a5e0…

Size

13.3 MB

Last updated

over 1 year ago

docker pull jas0n0ss/tengine:amd64