Build Nginx with HTTP/2 support
This repository contains a Dockerfile that compiles an Nginx installation with support for HTTP/2 enabled. We also provide a sample nginx.conf.
The build we do in this Dockerfile will work for a single static website. You may need to change some
configure options according to your needs.
To make the Docker build, you may clone this repository and run the Docker commands as follows.
$ git clone email@example.com:bluesoft/dockerfiles.git $ cd nginx-h2 $ docker build -t nginx-h2 . $ docker run -d -p 8443:443 -v /path/to/my/website/:/usr/local/nginx/html/ nginx-h2
Or you may just pull the image from Dockerhub.
$ docker pull bluesoftbr/nginx-h2 $ docker run -d -p 8443:443 -v /path/to/my/website/:/usr/local/nginx/html/ nginx-h2
/path/to/my/website/ to the absolute path to your website.
https://localhost:8443/ through your browser and have fun!