From 3ef441505901b2a4f9b3eccc6edd5fdb5303c3ee Mon Sep 17 00:00:00 2001 From: Alec Ferguson Date: Wed, 29 Nov 2017 20:11:17 -0800 Subject: [PATCH 1/5] Added Test::Nginx to alpine-fat --- alpine-fat/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/alpine-fat/Dockerfile b/alpine-fat/Dockerfile index dbd6ad4..69691ae 100644 --- a/alpine-fat/Dockerfile +++ b/alpine-fat/Dockerfile @@ -2,7 +2,8 @@ # https://github.com/openresty/docker-openresty # # This is an alpine-based build that keeps some build-related -# packages, has perl installed for opm, and includes luarocks. +# packages, has perl installed for opm, Test::Nginx for testing, +# and includes luarocks. FROM alpine:latest @@ -74,6 +75,7 @@ RUN apk add --no-cache --virtual .build-deps \ linux-headers \ make \ perl \ + perl-dev \ unzip \ zlib \ && cd /tmp \ @@ -104,6 +106,8 @@ RUN apk add --no-cache --virtual .build-deps \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ && make build \ && make install \ + && curl -L http://cpanmin.us | perl - App::cpanminus --no-wget \ + && cpanm Test::Nginx --no-wget \ && cd /tmp \ && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && apk add --no-cache --virtual .gettext gettext \ From da0198174202c9c569d33e9eeb53905b52a21384 Mon Sep 17 00:00:00 2001 From: Alec Ferguson Date: Wed, 29 Nov 2017 22:25:59 -0800 Subject: [PATCH 2/5] Removed unnecessary perl-dev install --- alpine-fat/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/alpine-fat/Dockerfile b/alpine-fat/Dockerfile index 69691ae..1549ae0 100644 --- a/alpine-fat/Dockerfile +++ b/alpine-fat/Dockerfile @@ -75,7 +75,6 @@ RUN apk add --no-cache --virtual .build-deps \ linux-headers \ make \ perl \ - perl-dev \ unzip \ zlib \ && cd /tmp \ From 49ba96df47ebe854b5c0535beaec03871d8bf93a Mon Sep 17 00:00:00 2001 From: Alec Ferguson Date: Thu, 30 Nov 2017 05:26:19 -0800 Subject: [PATCH 3/5] Using https url. Cpanm uninstalling itself. --- alpine-fat/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alpine-fat/Dockerfile b/alpine-fat/Dockerfile index 1549ae0..60fc2f6 100644 --- a/alpine-fat/Dockerfile +++ b/alpine-fat/Dockerfile @@ -105,8 +105,9 @@ RUN apk add --no-cache --virtual .build-deps \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ && make build \ && make install \ - && curl -L http://cpanmin.us | perl - App::cpanminus --no-wget \ + && curl -L https://cpanmin.us | perl - App::cpanminus --no-wget \ && cpanm Test::Nginx --no-wget \ + && cpanm --uninstall App::cpanminus \ && cd /tmp \ && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && apk add --no-cache --virtual .gettext gettext \ From 183557fd4f6b6f71aed9ab2d6eed6169c74de6d1 Mon Sep 17 00:00:00 2001 From: Alec Ferguson Date: Thu, 30 Nov 2017 07:44:10 -0800 Subject: [PATCH 4/5] Using cpan for install instead of cpanm --- alpine-fat/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/alpine-fat/Dockerfile b/alpine-fat/Dockerfile index 60fc2f6..03a881e 100644 --- a/alpine-fat/Dockerfile +++ b/alpine-fat/Dockerfile @@ -62,6 +62,7 @@ RUN apk add --no-cache --virtual .build-deps \ geoip-dev \ libxslt-dev \ perl-dev \ + perl-utils \ readline-dev \ zlib-dev \ && apk add --no-cache \ @@ -105,9 +106,7 @@ RUN apk add --no-cache --virtual .build-deps \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ && make build \ && make install \ - && curl -L https://cpanmin.us | perl - App::cpanminus --no-wget \ - && cpanm Test::Nginx --no-wget \ - && cpanm --uninstall App::cpanminus \ + && PERL_MM_USE_DEFAULT=1 cpan install Test::Nginx \ && cd /tmp \ && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && apk add --no-cache --virtual .gettext gettext \ From 0be74b6c13e2bd2b55c9f8c3b8fd8acc4971cee0 Mon Sep 17 00:00:00 2001 From: Alec Ferguson Date: Sun, 3 Dec 2017 22:21:46 -0800 Subject: [PATCH 5/5] Removing cpan cache after build --- alpine-fat/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/alpine-fat/Dockerfile b/alpine-fat/Dockerfile index 03a881e..a9877cf 100644 --- a/alpine-fat/Dockerfile +++ b/alpine-fat/Dockerfile @@ -107,6 +107,7 @@ RUN apk add --no-cache --virtual .build-deps \ && make build \ && make install \ && PERL_MM_USE_DEFAULT=1 cpan install Test::Nginx \ + && rm -rf /root/.cpan \ && cd /tmp \ && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ && apk add --no-cache --virtual .gettext gettext \