From 172d79aff48a010c8bfbace70fc3bcd89727f384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20D=C3=B6ring?= Date: Fri, 7 Apr 2017 12:58:49 +0200 Subject: [PATCH] Upgrade to nginx 1.11.13 --- Dockerfile | 2 +- Dockerfile.alpine | 2 +- README.md | 2 +- test/certs/create_server_certificate.sh | 26 ++++++++++++------------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6da4b03..b0c3cf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.11.10 +FROM nginx:1.11.13 MAINTAINER Jason Wilder mail@jasonwilder.com # Install wget and install/updates certificates diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 8715a2a..b92145c 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM nginx:1.11.10-alpine +FROM nginx:1.11.13-alpine MAINTAINER Jason Wilder mail@jasonwilder.com # Install wget and install/updates certificates diff --git a/README.md b/README.md index 0b8191a..af37350 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![nginx 1.11.10](https://img.shields.io/badge/nginx-1.11.10-brightgreen.svg) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) [![Build Status](https://travis-ci.org/jwilder/nginx-proxy.svg?branch=master)](https://travis-ci.org/jwilder/nginx-proxy) [![](https://img.shields.io/docker/stars/jwilder/nginx-proxy.svg)](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') [![](https://img.shields.io/docker/pulls/jwilder/nginx-proxy.svg)](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') +![nginx 1.11.13](https://img.shields.io/badge/nginx-1.11.13-brightgreen.svg) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) [![Build Status](https://travis-ci.org/jwilder/nginx-proxy.svg?branch=master)](https://travis-ci.org/jwilder/nginx-proxy) [![](https://img.shields.io/docker/stars/jwilder/nginx-proxy.svg)](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') [![](https://img.shields.io/docker/pulls/jwilder/nginx-proxy.svg)](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') nginx-proxy sets up a container running nginx and [docker-gen][1]. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped. diff --git a/test/certs/create_server_certificate.sh b/test/certs/create_server_certificate.sh index 833b97c..52f728f 100755 --- a/test/certs/create_server_certificate.sh +++ b/test/certs/create_server_certificate.sh @@ -11,7 +11,7 @@ if [[ "$#" -eq 0 ]]; then You can also create certificates for wildcard domains: $(basename $0) '*.my-domain.tdl' - + EOF exit 0 else @@ -24,8 +24,8 @@ fi # Create a nginx container (which conveniently provides the `openssl` command) ############################################################################### -CONTAINER=$(docker run -d -v $DIR:/work -w /work -e SAN="$ALTERNATE_DOMAINS" nginx:1.11.8) -# Configure openssl +CONTAINER=$(docker run -d -v $DIR:/work -w /work -e SAN="$ALTERNATE_DOMAINS" nginx:1.11.13) +# Configure openssl docker exec $CONTAINER bash -c ' mkdir -p /ca/{certs,crl,private,newcerts} 2>/dev/null echo 1000 > /ca/serial @@ -117,7 +117,7 @@ function openssl { } function exitfail { - echo + echo echo ERROR: "$@" docker rm -f $CONTAINER exit 1 @@ -129,15 +129,15 @@ function exitfail { ############################################################################### if ! [[ -f "$DIR/ca-root.key" ]]; then - echo + echo echo "> Create a Certificate Authority root key: $DIR/ca-root.key" openssl genrsa -out ca-root.key 2048 [[ $? -eq 0 ]] || exitfail failed to generate CA root key fi -# Create a CA root certificate +# Create a CA root certificate if ! [[ -f "$DIR/ca-root.crt" ]]; then - echo + echo echo "> Create a CA root certificate: $DIR/ca-root.crt" openssl req -config /ca/openssl.cnf \ -key ca-root.key \ @@ -154,30 +154,30 @@ fi # create server key and certificate signed by the certificate authority ############################################################################### -echo +echo echo "> Create a host key: $DIR/$DOMAIN.key" openssl genrsa -out "$DOMAIN.key" 2048 -echo +echo echo "> Create a host certificate signing request" SAN="$ALTERNATE_DOMAINS" openssl req -config /ca/openssl.cnf \ -key "$DOMAIN.key" \ - -new -out "/ca/$DOMAIN.csr" -days 1000 -extensions san_env -subj "/CN=$DOMAIN" + -new -out "/ca/$DOMAIN.csr" -days 1000 -extensions san_env -subj "/CN=$DOMAIN" [[ $? -eq 0 ]] || exitfail failed to generate server certificate signing request -echo +echo echo "> Create server certificate: $DIR/$DOMAIN.crt" SAN="$ALTERNATE_DOMAINS" openssl ca -config /ca/openssl.cnf -batch \ -extensions server_cert \ -extensions san_env \ -in "/ca/$DOMAIN.csr" \ - -out "$DOMAIN.crt" + -out "$DOMAIN.crt" [[ $? -eq 0 ]] || exitfail failed to generate server certificate # Verify host certificate -#openssl x509 -noout -text -in "$DOMAIN.crt" +#openssl x509 -noout -text -in "$DOMAIN.crt" docker rm -f $CONTAINER >/dev/null