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
- 
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.
 
 
 - Run Nginx Proxy Manager:
 - 
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]]
- 
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.
 
 
 - Access Nginx Proxy Manager and create a new host with the following settings:
 - 
Finalize Setup
- Wait for DNS propagation from Cloudflare. Once completed, your Docker setup should be accessible over HTTPS without warnings.