# Use a lightweight base image FROM alpine:latest # Install dependencies RUN apk add --no-cache curl iptables # Download and install Hysteria RUN curl -Lo /usr/local/bin/hysteria https://github.com/HyNetwork/hysteria/releases/latest/download/hysteria-linux-amd64 && \ chmod +x /usr/local/bin/hysteria # Create a directory for Hysteria configuration RUN mkdir -p /etc/hysteria # Create the Hysteria configuration file directly in the Dockerfile RUN echo '{' > /etc/hysteria/config.json && \ echo ' "listen": ":7860",' >> /etc/hysteria/config.json && \ echo ' "acme": {' >> /etc/hysteria/config.json && \ echo ' "domains": ["fake-domain.com"],' >> /etc/hysteria/config.json && \ echo ' "email": "fake-email@example.com",' >> /etc/hysteria/config.json && \ echo ' "disable_tls_verification": true' >> /etc/hysteria/config.json && \ echo ' },' >> /etc/hysteria/config.json && \ echo ' "up_mbps": 100,' >> /etc/hysteria/config.json && \ echo ' "down_mbps": 100' >> /etc/hysteria/config.json && \ echo '}' >> /etc/hysteria/config.json # Expose the required ports for ACME (HTTP and HTTPS) EXPOSE 80 EXPOSE 443 # Start Hysteria CMD ["/usr/local/bin/hysteria", "-c", "/etc/hysteria/config.json", "server"]