Skip to content

Commit

Permalink
Merge pull request #1 from ncopa/feature/alpine-variant
Browse files Browse the repository at this point in the history
Fix build dependency for alpine variant
  • Loading branch information
zakame committed Apr 22, 2016
2 parents ea6f0fd + 8b3cd63 commit 2a416b5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ ENV PERL_CPANM_OPT --no-wget

RUN set -x \
&& NPROC=$(getconf _NPROCESSORS_ONLN) \
&& apk add --no-cache make \
&& apk add --no-cache --virtual .build-deps curl procps tar build-base \
&& apk add --no-cache --virtual .build-deps curl procps tar build-base make \
&& curl -SL https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.22.1.tar.bz2 -o perl-5.22.1.tar.bz2 \
&& echo '29f9b320b0299577a3e1d02e9e8ef8f26f160332 *perl-5.22.1.tar.bz2' | sha1sum -c - \
&& tar --strip-components=1 -xjf perl-5.22.1.tar.bz2 -C /usr/src/perl \
Expand All @@ -27,6 +26,14 @@ RUN set -x \
&& curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \
&& chmod +x cpanm \
&& ./cpanm App::cpanminus \
&& runDeps="$( \
scanelf --needed --nobanner --recursive /usr/local \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --virtual .perl-rundeps $runDeps make \
&& apk del .build-deps \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /tmp/*

Expand Down

0 comments on commit 2a416b5

Please sign in to comment.