https://github.com/jcmoraisjr/nginx
A nginx's Docker image as small as Alpine Linux + apk add nginx
https://github.com/jcmoraisjr/nginx
Last synced: 5 days ago
JSON representation
A nginx's Docker image as small as Alpine Linux + apk add nginx
- Host: GitHub
- URL: https://github.com/jcmoraisjr/nginx
- Owner: jcmoraisjr
- Created: 2016-12-24T16:00:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-24T16:05:19.000Z (over 8 years ago)
- Last Synced: 2025-01-20T14:50:11.467Z (5 months ago)
- Language: Nginx
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#nginx
A nginx's Docker image as small as Alpine Linux + apk add nginx.
All logging messages are sent to stdout.
[](https://quay.io/repository/jcmoraisjr/nginx)
#Usage
Mount the root site on `/var/lib/nginx/html`:
docker run -d --name nginx -p 80:80 -v ${PWD}:/var/lib/nginx/html quay.io/jcmoraisjr/nginx
#Deploy
Use local `/var/www/html` directory as the root site:
[Unit]
Description=Nginx
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=-/usr/bin/docker stop nginx
ExecStartPre=-/usr/bin/docker rm nginx
ExecStart=/usr/bin/docker run \
--name nginx \
-p 80:80 \
-v /var/www/html:/var/lib/nginx/html:ro \
quay.io/jcmoraisjr/nginx:latest
ExecStop=-/usr/bin/docker stop nginx
RestartSec=10s
Restart=always
[Install]
WantedBy=multi-user.target