diff --git a/.github/workflows/build-alpine.yml b/.github/workflows/build-alpine.yml new file mode 100644 index 00000000..223dd239 --- /dev/null +++ b/.github/workflows/build-alpine.yml @@ -0,0 +1,33 @@ +name: Build and test Perl 5.32 on alpine + +on: + push: + branches: + - '**' + tags-ignore: + - '*' + pull_request: + +jobs: + build-alpine: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Clone docker-library/official-images (for testing) + run: | + git clone --depth 1 --single-branch https://github.com/docker-library/official-images.git + - name: Build image + run: | + docker version + docker build --no-cache -t perl:5.32-alpine 5.032.000-alpine + docker build --no-cache -t perl:5.32-alpine-threaded 5.032.000-alpine,threaded + - name: Inspect image creation and tag time + run: | + docker image inspect --format \'{{.Created}}\' perl:5.32-alpine + docker image inspect --format \'{{.Metadata.LastTagTime}}\' perl:5.32-alpine + docker image inspect --format \'{{.Created}}\' perl:5.32-alpine-threaded + docker image inspect --format \'{{.Metadata.LastTagTime}}\' perl:5.32-alpine-threaded + - name: Run tests + run: | + ./official-images/test/run.sh perl:5.32-alpine + ./official-images/test/run.sh perl:5.32-alpine-threaded diff --git a/5.032.000-alpine,threaded/DevelPatchPerl.patch b/5.032.000-alpine,threaded/DevelPatchPerl.patch new file mode 100644 index 00000000..e69de29b diff --git a/5.032.000-alpine,threaded/Dockerfile b/5.032.000-alpine,threaded/Dockerfile new file mode 100644 index 00000000..0dfc3927 --- /dev/null +++ b/5.032.000-alpine,threaded/Dockerfile @@ -0,0 +1,39 @@ +FROM alpine:3.12 +LABEL maintainer="Peter Martini , Zak B. Elep " + +COPY *.patch /usr/src/perl/ +WORKDIR /usr/src/perl + +RUN set -x \ + && apk add --no-cache --virtual .build-deps curl dpkg dpkg-dev procps tar build-base make xz \ + && curl -SL https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -o perl-5.32.0.tar.xz \ + && echo '6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b *perl-5.32.0.tar.xz' | sha256sum -c - \ + && tar --strip-components=1 -xaf perl-5.32.0.tar.xz -C /usr/src/perl \ + && rm perl-5.32.0.tar.xz \ + && cat *.patch | patch -p1 \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \ + && archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \ + && ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \ + && make -j$(nproc) \ + && TEST_JOBS=$(nproc) make test_harness \ + && make install \ + && cd /usr/src \ + && curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \ + && echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \ + && tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \ + && runDeps="$( \ + scanelf --needed --nobanner --recursive /usr/local \ + | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ + | sort -u \ + | xargs -r apk info --installed \ + | sort -u \ + | grep -v perl \ + )" \ + && apk add --virtual .perl-rundeps $runDeps make wget \ + && apk del .build-deps \ + && rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/* + +WORKDIR /root + +CMD ["perl5.32.0","-de0"] diff --git a/5.032.000-alpine/DevelPatchPerl.patch b/5.032.000-alpine/DevelPatchPerl.patch new file mode 100644 index 00000000..e69de29b diff --git a/5.032.000-alpine/Dockerfile b/5.032.000-alpine/Dockerfile new file mode 100644 index 00000000..160e57a6 --- /dev/null +++ b/5.032.000-alpine/Dockerfile @@ -0,0 +1,39 @@ +FROM alpine:3.12 +LABEL maintainer="Peter Martini , Zak B. Elep " + +COPY *.patch /usr/src/perl/ +WORKDIR /usr/src/perl + +RUN set -x \ + && apk add --no-cache --virtual .build-deps curl dpkg dpkg-dev procps tar build-base make xz \ + && curl -SL https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -o perl-5.32.0.tar.xz \ + && echo '6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b *perl-5.32.0.tar.xz' | sha256sum -c - \ + && tar --strip-components=1 -xaf perl-5.32.0.tar.xz -C /usr/src/perl \ + && rm perl-5.32.0.tar.xz \ + && cat *.patch | patch -p1 \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \ + && archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \ + && ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \ + && make -j$(nproc) \ + && TEST_JOBS=$(nproc) make test_harness \ + && make install \ + && cd /usr/src \ + && curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \ + && echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \ + && tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \ + && runDeps="$( \ + scanelf --needed --nobanner --recursive /usr/local \ + | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ + | sort -u \ + | xargs -r apk info --installed \ + | sort -u \ + | grep -v perl \ + )" \ + && apk add --virtual .perl-rundeps $runDeps make wget \ + && apk del .build-deps \ + && rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/* + +WORKDIR /root + +CMD ["perl5.32.0","-de0"]