Skip to content

Commit de35507

Browse files
committed
Add a build arg for the pkg to the nginx image
[refs !c2f282de0b87]
1 parent 157854c commit de35507

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

nginx/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
FROM debian:buster-slim
22

3+
ARG NGINX_PKG_TYPE=full
4+
ENV NGINX_PKG=nginx-${NGINX_PKG_TYPE:-full}
5+
36
RUN apt-get update \
4-
&& apt-get install -y nginx \
7+
&& apt-get install -y $NGINX_PKG \
58
&& rm -rf /var/lib/apt/lists/* \
69
&& rm /var/log/nginx/access.log \
710
&& rm /var/log/nginx/error.log \

nginx/docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '3.3'
2+
3+
services:
4+
nginx-full:
5+
image: jfahrer/nginx:stretch-full
6+
build:
7+
context: .
8+
args:
9+
- NGINX_PKG_TYPE=full
10+
11+
nginx-light:
12+
image: jfahrer/nginx:stretch-light
13+
build:
14+
context: .
15+
args:
16+
- NGINX_PKG_TYPE=light
17+
18+
nginx-extras:
19+
image: jfahrer/nginx:stretch-extras
20+
build:
21+
context: .
22+
args:
23+
- NGINX_PKG_TYPE=extras

0 commit comments

Comments
 (0)