Introduce custom base image
To avoid discussions between the mainline guys and stable guys, this PR introduces customizable base images via build args. Closes #1189
This commit is contained in:
parent
c33dedf10b
commit
a1a9ec98d6
3 changed files with 22 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
FROM nginx:1.14.1
|
ARG BASE_IMAGE_TAG=1.14.1
|
||||||
|
FROM nginx:$BASE_IMAGE_TAG
|
||||||
LABEL maintainer="Jason Wilder mail@jasonwilder.com"
|
LABEL maintainer="Jason Wilder mail@jasonwilder.com"
|
||||||
|
|
||||||
# Install wget and install/updates certificates
|
# Install wget and install/updates certificates
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM nginx:1.14.1-alpine
|
ARG BASE_IMAGE_TAG=1.14.1-alpine
|
||||||
|
FROM nginx:$BASE_IMAGE_TAG
|
||||||
LABEL maintainer="Jason Wilder mail@jasonwilder.com"
|
LABEL maintainer="Jason Wilder mail@jasonwilder.com"
|
||||||
|
|
||||||
# Install wget and install/updates certificates
|
# Install wget and install/updates certificates
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -36,6 +36,24 @@ This image is based on the nginx:alpine image. Use this image to fully support H
|
||||||
|
|
||||||
$ docker pull jwilder/nginx-proxy:alpine
|
$ docker pull jwilder/nginx-proxy:alpine
|
||||||
|
|
||||||
|
### Custom base image
|
||||||
|
|
||||||
|
nginx-proxy runs with the latest stable nginx. You can build your own image and choose a different base image tag (e.g `1.15.7` or `1.15.7-alpine`).
|
||||||
|
|
||||||
|
```
|
||||||
|
# debian
|
||||||
|
$ docker build --build-arg BASE_IMAGE_TAG=1.15 -t nginx-proxy-test-1.15 .
|
||||||
|
$ docker run --rm nginx-proxy-test-1.15 nginx -v
|
||||||
|
nginx version: nginx/1.15.7
|
||||||
|
|
||||||
|
# alpine
|
||||||
|
$ docker build --build-arg BASE_IMAGE_TAG=1.15-alpine -t nginx-proxy-test-1.15 -f Dockerfile.alpine .
|
||||||
|
$ docker run --rm nginx-proxy-test-1.15 nginx -v
|
||||||
|
nginx version: nginx/1.15.7
|
||||||
|
```
|
||||||
|
|
||||||
|
For docker-compose see [docs.docker.com/compose/compose-file](https://docs.docker.com/compose/compose-file/#args).
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue