https://github.com/hlissner/docker-nginx-dev
Development nginx image for Docker
https://github.com/hlissner/docker-nginx-dev
Last synced: 3 months ago
JSON representation
Development nginx image for Docker
- Host: GitHub
- URL: https://github.com/hlissner/docker-nginx-dev
- Owner: hlissner
- License: mit
- Created: 2016-02-20T04:04:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-29T12:05:34.000Z (over 8 years ago)
- Last Synced: 2025-01-13T21:44:30.095Z (5 months ago)
- Language: Nginx
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nginx - Development Image
> Don't use this for production!
This is a tiny development docker image for [Nginx](https://www.nginx.com/). Used for my
local dev environment.`docker pull vnought/nginx-dev`
Either use a Dockerfile to customize per-project, docker-compose, or use this one-liner
from your project:```
docker run -d -v "$(pwd):/www" \
-v "$(pwd)/conf/vhost.conf:/etc/nginx/conf.d/vhost.conf" \
vnought/nginx-dev`
```App runtimes should be in linked containers (See
[docker-phpfpm-dev](https://github.com/hlissner/docker-phpfpm-dev))## Dockerfile
```
FROM vnought/nginx-dev
COPY conf/vhost.conf /etc/nginx/conf.d/vhost.conf
```Then build+start it:
```
docker build -t my-project .
docker run -v $(pwd):/www my-project
```## docker-compose
```yaml
web:
image: vnought/nginx-dev
ports:
- "8080:80"
volumes:
- .:/www
- ./conf/vhost.conf:/etc/nginx/conf.d/vhost.conf
links:
- phpphp:
image: vnought/phpfpm-dev
volumes:
- .:/www
```