NGINX docker image to redirect request from HTTP to HTTPS.
$ docker pull joshuamarquez/https-redirect
To test it actually works first run https-redirect
instance.
$ docker run --name nginx_redirect -d https-redirect
Then using appropriate/curl
make a request.
$ docker run --network container:nginx_redirect appropriate/curl -Is $(docker ps -aqf "name=nginx_redirect")
It should respond with something like:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.11.13
Date: Wed, 17 May 2017 00:35:51 GMT
Content-Type: text/html
Content-Length: 186
Connection: keep-alive
Location: https://7f708982c19d/