From 3d249540ba4369037a03a4f6f92be9e2ee30e3cd Mon Sep 17 00:00:00 2001 From: Johannes Schickling Date: Fri, 17 Jun 2016 21:35:47 +0200 Subject: [PATCH] added nginx-envtpl --- README.md | 1 + nginx-envtpl/Dockerfile | 11 +++++++++++ nginx-envtpl/README.md | 9 +++++++++ nginx-envtpl/entrypoint.sh | 5 +++++ 4 files changed, 26 insertions(+) create mode 100644 nginx-envtpl/Dockerfile create mode 100644 nginx-envtpl/README.md create mode 100644 nginx-envtpl/entrypoint.sh 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 "$@"