From 7c0f7b944911d81cfe587de8e4ee53cac9ffdb2a Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Thu, 12 Jan 2017 00:21:39 -0500 Subject: [PATCH] Fixed Alpine image, removed dhparams gen from test units --- Dockerfile.alpine | 5 ++--- generate-dhparam.sh | 2 +- test/lib/ssl/dhparam.pem | 8 ++++++++ test/test_helpers.bash | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 test/lib/ssl/dhparam.pem diff --git a/Dockerfile.alpine b/Dockerfile.alpine index ef43306..3d03cf3 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -3,12 +3,11 @@ MAINTAINER Jason Wilder mail@jasonwilder.com # Install wget and install/updates certificates RUN apk add --no-cache --virtual .run-deps \ - ca-certificates bash wget \ + ca-certificates bash wget openssl \ && update-ca-certificates # Configure Nginx and apply fix for very long server names -RUN echo "daemon off;" >> /etc/nginx/nginx.conf \ - && sed -i 's/^http {/&\n server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf +RUN echo "daemon off;" >> /etc/nginx/nginx.conf # Install Forego ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego diff --git a/generate-dhparam.sh b/generate-dhparam.sh index ed010b7..36c4f8b 100755 --- a/generate-dhparam.sh +++ b/generate-dhparam.sh @@ -39,4 +39,4 @@ touch $GEN_LOCKFILE && nginx -s reload ) | grep -vE '^[\.+]+' rm $GEN_LOCKFILE -) & +) &disown diff --git a/test/lib/ssl/dhparam.pem b/test/lib/ssl/dhparam.pem new file mode 100644 index 0000000..eb3218c --- /dev/null +++ b/test/lib/ssl/dhparam.pem @@ -0,0 +1,8 @@ +-----BEGIN DH PARAMETERS----- +MIIBCAKCAQEA1cae6HqPSgicEuAuSCf6Ii3d6qMX9Ta8lnwoX0JQ0CWK7mzaiiIi +dY7oHmc4cq0S3SH+g0tdLP9yqygFS9hdUGINwS2VV6poj2/vdL/dUshegyxpEH58 +nofCPnFDeKkcPDMYAlGS8zjp60TsBkRJKcrxxwnjod1Q5mWuMN5KH3sxs842udKH +0nHFE9kKW/NfXb+EGsjpocGpf786cGuCO2d00THsoItOEcM9/aI8DX1QcyxAHR6D +HaYTFJnyyx8Q44u27M15idI4pbNoKORlotiuOwCTGYCfbN14aOV+Ict7aSF8FWpP +48j9SMNuIu2DlF9pNLo6fsrOjYY3c9X12wIBAg== +-----END DH PARAMETERS----- diff --git a/test/test_helpers.bash b/test/test_helpers.bash index 0fd9532..422df24 100644 --- a/test/test_helpers.bash +++ b/test/test_helpers.bash @@ -35,6 +35,7 @@ function nginxproxy { && docker run -d \ --label bats-type="nginx-proxy" \ --name $container_name \ + -v $DIR/lib/ssl/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro \ "$@" \ $SUT_IMAGE \ && wait_for_nginxproxy_container_to_start $container_name \