宅内LANでWindows機のローカルIPアドレスを固定化する ネームサーバーでlocaldev.azechi.netを宅内LANのWin機のアドレスに設定する localdev.azechi.netのサーバー証明書をLet's Encryptに発行してもらう Docker Descktopを使ってnginxのhttpsリバースプロキシを実行する default.conf.template map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; server_name ${HOST}; ssl_certificate /certs/live/${HOST}/fullchain.pem; ssl_certificate_key /certs/live/${HOST}/privkey.pem; location / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_pass http://host.docker.internal:${LOCALPORT}; } } docker run -it --rm -p 80:80 -p 443:443 --mount type=bind,source=$PWD/default.conf.template,target=/etc/nginx/templates/default.conf.template --mount type=bind,source=$HOME/cert/etc/,target=/certs -e HOST=localdev.azechi.net -e LOCALPORT=5174 nginx