A nginx base test TLS server.
Run the command:
docker run -p 443:443 haz314/nginx_tls
Create a compose file:
services:
nginx_tls:
image: haz314/nginx_tls
ports:
- 443:443
Then run:
docker compose up nginx_tls
And visit localhost:443
Run the command:
docker run -p 80:80 -p 443:443 haz314/nginx_tls
Create a compose file:
services:
nginx_tls:
image: haz314/nginx_tls
ports:
- 80:80
- 443:443
Then Run:
docker compose up nginx_tls
And visit either localhost:443 or localhost:80
With certificate and key files, certificate.crt
and private.key
Run the command:
docker run -v "./certificate.crt:/etc/nginx/cert.crt" -v "./private.key:/etc/nginx/priv.key" -p 80:80 -p 443:443 haz314/nginx_tls
Create a compose file:
services:
nginx_tls:
image: haz314/nginx_tls
volumes:
- ./certificate.crt:/etc/nginx/cert.crt
- ./private.key:/etc/nginx/priv.key
ports:
- 80:80
- 443:443
Then Run:
$ docker compose up nginx_tls
And visit either localhost:443 or localhost:80
Please visit the GitHub Repo > Haz001/docker_nginx_tls