RedTeam
Others
Docker
HTTPS

Docker & HTTPS

Running Docker containers over HTTPS is beneficial for simulating real-world scenarios, providing more realistic Proof-of-Concept (POC) environments without browser warnings about insecure HTTP data transfer.


Steps to Set Up Docker with HTTPS

  1. Set Up Docker Containers

    • Run Nginx Proxy Manager:
      • Configure default ports as needed.
      • Add volumes:
        • ./data:/data
        • ./letsencrypt:/etc/letsencrypt
    • Run Your Application Docker Container:
      • Assign any preferred port.
  2. Domain Setup

    • Choose a domain to use for demonstration purposes.
    • Update the server name in your DNS settings to use Cloudflare.
    • In Cloudflare, add a new A record for the desired subdomain, pointing it to your local machine's IP. Disable Cloudflare's proxy setting for this record.

![[brave_uba3WT29uC.png]]

  1. Configure Nginx Proxy Manager

    • Access Nginx Proxy Manager and create a new host with the following settings:
      • Protocol: HTTP
      • IP Address: Local machine IP (e.g., 192.168.2.x)
      • Port: Specify the application's port
      • Enable WebSocket support
      • Set up an SSL certificate using your Cloudflare API key.
  2. Finalize Setup

    • Wait for DNS propagation from Cloudflare. Once completed, your Docker setup should be accessible over HTTPS without warnings.