Skip to content

Commit

Permalink
Add a build arg for the pkg to the nginx image
Browse files Browse the repository at this point in the history
[refs !c2f282de0b87]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent 157854c commit de35507
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nginx/Dockerfile
@@ -1,7 +1,10 @@
FROM debian:buster-slim

ARG NGINX_PKG_TYPE=full
ENV NGINX_PKG=nginx-${NGINX_PKG_TYPE:-full}

RUN apt-get update \
&& apt-get install -y nginx \
&& apt-get install -y $NGINX_PKG \
&& rm -rf /var/lib/apt/lists/* \
&& rm /var/log/nginx/access.log \
&& rm /var/log/nginx/error.log \
Expand Down
23 changes: 23 additions & 0 deletions nginx/docker-compose.yml
@@ -0,0 +1,23 @@
version: '3.3'

services:
nginx-full:
image: jfahrer/nginx:stretch-full
build:
context: .
args:
- NGINX_PKG_TYPE=full

nginx-light:
image: jfahrer/nginx:stretch-light
build:
context: .
args:
- NGINX_PKG_TYPE=light

nginx-extras:
image: jfahrer/nginx:stretch-extras
build:
context: .
args:
- NGINX_PKG_TYPE=extras

0 comments on commit de35507

Please sign in to comment.