-
Notifications
You must be signed in to change notification settings - Fork 51
Implement :alpine
variant
#24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zakame
wants to merge
10
commits into
Perl:master
Choose a base branch
from
zakame:feature/alpine-variant
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
37962fd
Try out building with alpine image
zakame e90bf09
Remove build deps (but retain make)
zakame f7d5370
Fix build dependency for alpine variant
ncopa 1490fec
alpine/Dockerfile: Update for Perl 5.32 + review fixes
zakame 26d57bb
:gear: Add alpine,threaded variant
zakame 7e53490
:gear: Add workflow for alpine variants
zakame 1a0a75a
Add wget to alpine rundeps
zakame 4304b46
:gear: Fix alpine CMD
zakame cdd6844
Add archFlag and archBits for alpine
zakame ace194f
Filter out perl package in alpine builds, move to versioned dirs
zakame File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 alpine | ||
docker build --no-cache -t perl:5.32-alpine-threaded 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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 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 \ | ||
&& ./Configure -Duse64bitall -Dusethreads -Duseshrplib -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 \ | ||
)" \ | ||
&& 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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 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 \ | ||
&& ./Configure -Duse64bitall -Duseshrplib -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 \ | ||
)" \ | ||
&& apk add --virtual .perl-rundeps $runDeps make wget \ | ||
zakame marked this conversation as resolved.
Show resolved
Hide resolved
|
||
&& 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"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.