Skip to content

Commit 1490fec

Browse files
committed
alpine/Dockerfile: Update for Perl 5.32 + review fixes
Apply review changes and make this closer to what we have in the mainline Dockerfiles, thanks to @tianon! Update this to build Perl 5.32 now; it seems to build and test fine without any modification!
1 parent f7d5370 commit 1490fec

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

alpine/DevelPatchPerl.patch

-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
diff --git a/patchlevel.h b/patchlevel.h
2-
index bd56612..3d5f668 100644
3-
--- a/patchlevel.h
4-
+++ b/patchlevel.h
5-
@@ -137,6 +137,7 @@ static const char * const local_patches[] = {
6-
,"uncommitted-changes"
7-
#endif
8-
PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
9-
+ ,"Devel::PatchPerl 1.38"
10-
,NULL
11-
};
12-

alpine/Dockerfile

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
FROM alpine:latest
2-
MAINTAINER Peter Martini <[email protected]>
1+
FROM alpine:3.12
2+
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"
33

4-
RUN mkdir -p /usr/src/perl
54
COPY *.patch /usr/src/perl/
65
WORKDIR /usr/src/perl
76

8-
ENV PERL_CPANM_OPT --no-wget
9-
107
RUN set -x \
11-
&& NPROC=$(getconf _NPROCESSORS_ONLN) \
12-
&& apk add --no-cache --virtual .build-deps curl procps tar build-base make \
13-
&& curl -SL https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.22.1.tar.bz2 -o perl-5.22.1.tar.bz2 \
14-
&& echo '29f9b320b0299577a3e1d02e9e8ef8f26f160332 *perl-5.22.1.tar.bz2' | sha1sum -c - \
15-
&& tar --strip-components=1 -xjf perl-5.22.1.tar.bz2 -C /usr/src/perl \
16-
&& rm perl-5.22.1.tar.bz2 \
8+
&& apk add --no-cache --virtual .build-deps curl procps tar build-base make xz \
9+
&& curl -SL https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -o perl-5.32.0.tar.xz \
10+
&& echo '6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b *perl-5.32.0.tar.xz' | sha256sum -c - \
11+
&& tar --strip-components=1 -xaf perl-5.32.0.tar.xz -C /usr/src/perl \
12+
&& rm perl-5.32.0.tar.xz \
1713
&& cat *.patch | patch -p1 \
1814
&& ./Configure -Duse64bitall -Duseshrplib -des \
19-
&& sed -i -e "s,\(d_setlocale=\)'define',\1'undef',g" ./config.sh \
20-
&& ./Configure -S \
21-
&& install -m0644 ./config.sh ./xconfig.sh \
22-
&& make -j$NPROC \
23-
&& TEST_JOBS=$NPROC make test_harness \
15+
&& make -j$(nproc) \
16+
&& TEST_JOBS=$(nproc) make test_harness \
2417
&& make install \
2518
&& cd /usr/src \
26-
&& curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \
27-
&& chmod +x cpanm \
28-
&& ./cpanm App::cpanminus \
19+
&& curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \
20+
&& echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \
21+
&& tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \
2922
&& runDeps="$( \
3023
scanelf --needed --nobanner --recursive /usr/local \
3124
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
@@ -35,7 +28,7 @@ RUN set -x \
3528
)" \
3629
&& apk add --virtual .perl-rundeps $runDeps make \
3730
&& apk del .build-deps \
38-
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /tmp/*
31+
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/*
3932

4033
WORKDIR /root
4134

0 commit comments

Comments
 (0)