An open API service indexing awesome lists of open source software.

https://github.com/makocchi-git/docker-nginx-hostname

Nginx image that shows container's hostname
https://github.com/makocchi-git/docker-nginx-hostname

docker docker-image nginx sample

Last synced: about 2 months ago
JSON representation

Nginx image that shows container's hostname

Awesome Lists containing this project

README

          

[![makocchi/docker-nginx-hostname](https://shields.beevelop.com/docker/image/image-size/makocchi/docker-nginx-hostname/latest.svg)]()
[![makocchi/docker-nginx-hostname](https://shields.beevelop.com/docker/image/layers/makocchi/docker-nginx-hostname/latest.svg)]()

# docker-nginx-hostname
Nginx image that shows container's hostname.

# Usage

```bash
$ sudo docker run -d -p80:80 -p443:443 --name=sample-web makocchi/docker-nginx-hostname
```

## make ssl.key and ssl.crt

Make your ssl cert.

```bash
$ openssl genrsa -out ssl.key 2048
$ openssl req -x509 -new -nodes -key ssl.key -days 10000 -out ssl.crt -subj "/CN=makocchi.com"
$ cp ssl.key ssl.crt files/etc/nginx/conf.d/.
```