https://github.com/magnetikonline/docker-nginx
Nginx web server Docker image, compiled from release source.
https://github.com/magnetikonline/docker-nginx
docker docker-image docker-multi-stage-build nginx
Last synced: 2 months ago
JSON representation
Nginx web server Docker image, compiled from release source.
- Host: GitHub
- URL: https://github.com/magnetikonline/docker-nginx
- Owner: magnetikonline
- License: mit
- Created: 2015-03-10T06:41:09.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2024-05-25T06:04:23.000Z (about 2 years ago)
- Last Synced: 2025-01-11T13:45:40.970Z (over 1 year ago)
- Topics: docker, docker-image, docker-multi-stage-build, nginx
- Language: Shell
- Homepage: https://hub.docker.com/r/magnetikonline/nginx/
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Nginx
`Dockerfile` using Ubuntu 18.04 as base which provides:
- [Nginx 1.20.2](https://nginx.org/en/CHANGES-1.20) (compiled from source).
- Nginx configuration passed in from host file system.
- Logging within container at `/var/log/nginx` (optionally passed to host).
- Document root from host file system mounted within container at `/srv/http`.
- Ports `80` (HTTP) and `443` (HTTPS) exposed at `8080` and `8443` respectively.
## Usage
To build Docker image:
```sh
$ ./build.sh
```
Alternatively pull the image direct from Docker Hub:
```sh
$ docker pull magnetikonline/nginx
```
Then to run:
```sh
$ ./run.sh \
-c /path/to/nginx.conf \
-d /path/to/docroot
```
Or to additionally pass Nginx logs back to host:
```sh
$ ./run.sh \
-c /path/to/nginx.conf \
-d /path/to/docroot \
-l /path/to/logs
```
An Nginx configuration example located under [`resource/conf`](resource/conf).