Ao contrário de alguns reivindicados, é possível fazê-lo com o proxy nginx.
Aqui está o docker-compose.yml
:
version: '3'
services:
nginx_proxy:
container_name: "proxy"
image: reiz/nginx_proxy:latest
ports:
- 8888:8888
volumes:
- ./nginx.conf:/usr/local/nginx/conf/nginx.conf:ro
Aqui está o nginx.conf
:
user www-data;
worker_processes auto;
daemon off; # Don't run Nginx as daemon, as we run it in Docker we need a foreground process.
events {}
http {
server_names_hash_bucket_size 128;
access_log /var/log/nginx_access.log;
error_log /var/log/nginx_errors.log;
# Whitelist Google and Heise
server {
listen 8888;
proxy_connect;
proxy_max_temp_file_size 0;
resolver 8.8.8.8;
location / {
proxy_pass http://$http_host;
proxy_set_header Host $http_host;
}
}
}