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
- Host: GitHub
- URL: https://github.com/makocchi-git/docker-nginx-hostname
- Owner: makocchi-git
- License: wtfpl
- Created: 2018-10-22T12:01:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T12:11:05.000Z (almost 7 years ago)
- Last Synced: 2025-06-07T03:03:26.885Z (about 1 year ago)
- Topics: docker, docker-image, nginx, sample
- Language: Dockerfile
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[]()
[]()
# 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/.
```