Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build-alpine.yml
Original file line number Diff line number Diff line change
@@ -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
Empty file.
39 changes: 39 additions & 0 deletions 5.032.000-alpine,threaded/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM alpine:3.12
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

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"]
Empty file.
39 changes: 39 additions & 0 deletions 5.032.000-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM alpine:3.12
LABEL maintainer="Peter Martini <[email protected]>, Zak B. Elep <[email protected]>"

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"]