diff --git a/README.md b/README.md index b08518e..62cddb0 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Collection of lightweight and ready-to-use docker images * **[Latex](https://github.com/schickling/dockerfiles/tree/master/latex)** - Full texlive distribution * **[Mailcatcher](https://github.com/schickling/dockerfiles/tree/master/mailcatcher)** - Extra small mailcatcher image * **[mysql-backup-s3](https://github.com/schickling/dockerfiles/tree/master/mysql-backup-s3)** - Backup MySQL to S3 (supports periodic backups) +* **[nginx-envtpl](https://github.com/schickling/dockerfiles/tree/master/nginx-envtpl)** - Nginx image with support for enviornment variables using [envtpl](https://github.com/andreasjansson/envtpl) * **[NodeJS](https://github.com/schickling/dockerfiles/tree/master/nodejs)** - Minimal NodeJS + NPM image * **[Octave](https://github.com/schickling/dockerfiles/tree/master/octave)** - Lightweight ocatve development environment * **[OpenCV](https://github.com/schickling/dockerfiles/tree/master/opencv)** - Lightweight ready-to use OpenCV image diff --git a/nginx-envtpl/Dockerfile b/nginx-envtpl/Dockerfile new file mode 100644 index 0000000..ad7a2bb --- /dev/null +++ b/nginx-envtpl/Dockerfile @@ -0,0 +1,11 @@ +FROM nginx:1.9 +MAINTAINER Johannes Schickling "schickling.j@gmail.com" + +RUN apt-get update && apt-get install -y python-pip +RUN pip install envtpl + +COPY entrypoint.sh / + +ENTRYPOINT ["/entrypoint.sh"] + +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx-envtpl/README.md b/nginx-envtpl/README.md new file mode 100644 index 0000000..c619784 --- /dev/null +++ b/nginx-envtpl/README.md @@ -0,0 +1,9 @@ +# nginx-envtpl + +Nginx image with support for enviornment variables using [envtpl](https://github.com/andreasjansson/envtpl) + +## Usage + +```sh +$ docker run -d -p 80:80 -v ./nginx.conf.tpl:/etc/nginx/nginx.conf.tpl schickling/nginx-envtpl +``` diff --git a/nginx-envtpl/entrypoint.sh b/nginx-envtpl/entrypoint.sh new file mode 100644 index 0000000..b3dfda1 --- /dev/null +++ b/nginx-envtpl/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +envtpl /etc/nginx/nginx.conf.tpl + +exec "$@"