voxxit/dockerfiles

cannot start image nginx-http2

jlandure opened this issue · 1 comments

I got an error launching docker run voxxit/nginx-http2

nginx: [emerg] BIO_new_file("/usr/local/nginx/conf/cert.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/cert.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

@jlandure The issue is that the image is using the provided configuration file, which looks for a certificate and private key to be at /usr/local/nginx/conf/cert.pem and /usr/local/nginx/conf/cert.key, respectively.

SSL is required for HTTP/2 to work. To provide a location to those files, you can do:

docker run \
  -v /location/of/cert.pem:/usr/local/nginx/conf/cert.pem \
  -v /location/of/cert.key:/usr/local/nginx/conf/cert.key \
  voxxit/nginx-http2