You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I tried this evening, and read a bit more about why the failing tests related to locale. Turns out that musl-libc still has some open issues regarding locales:
For my initial alpine build, I've settled on disabling setlocale() entirely, so I expect some issues; there ought to be another way to solve this.
At the very least, the resulting image size for perl:alpine (5.22.1) is very promising:
perl alpine 5c08e6b31771 About an hour ago 204.5 MB
perl latest b17836574ef6 5 months ago 656.4 MB
If using @ncopa's example Dockerfile (which deletes the installed .build-deps after installing cpanm,) it would be possible to bring down the alpine image to just around 50MB; I'll probably go with that setup later, leaving only curl and make so that CPAN installs of pure-Perl modules could work.
@spumer thanks for asking. Unfortunately I haven't gotten much feedback from #p5p last time and could not continue further. I doubt that there are specific changes for this on the upcoming 5.28 release as well, but I'll find some time to confirm.
Revisiting this one - I think we could just push out a :alpine image without issue, as long as we document the obvious issues of glibc vs musl differences.
Activity
ncopa commentedon Apr 7, 2016
I have an example Dockerfile.
I don't know how to embed it in
generate.plproperly? Maybe we should introduceDockerfile.templateandDockerfile.template-alpineor similar?There
make test_harnesshave some failing testcase related non UTF-8 locales.zakame commentedon Apr 8, 2016
I'll look into it this weekend 👍
Try out building with alpine image
zakame commentedon Apr 9, 2016
So I tried this evening, and read a bit more about why the failing tests related to locale. Turns out that musl-libc still has some open issues regarding locales:
For my initial alpine build, I've settled on disabling
setlocale()entirely, so I expect some issues; there ought to be another way to solve this.At the very least, the resulting image size for
perl:alpine(5.22.1) is very promising:If using @ncopa's example Dockerfile (which deletes the installed
.build-depsafter installingcpanm,) it would be possible to bring down the alpine image to just around 50MB; I'll probably go with that setup later, leaving onlycurlandmakeso that CPAN installs of pure-Perl modules could work.zakame commentedon Apr 22, 2016
Removing build deps:
I retained
makethough as a bare minimum socpanmcan install pure-Perl modules.Try out building with alpine image
zakame commentedon Jul 30, 2017
Coming back to this again. It seems ok building with 5.22.4, so now I'm testing building against 5.24.2.
There's still some errors for some parts still trying to find
setlocale(), so I'm gonna ask #p5p for help.spumer commentedon May 22, 2018
Any update?
zakame commentedon May 23, 2018
@spumer thanks for asking. Unfortunately I haven't gotten much feedback from #p5p last time and could not continue further. I doubt that there are specific changes for this on the upcoming 5.28 release as well, but I'll find some time to confirm.
Try out building with alpine image
zakame commentedon Sep 8, 2020
Perl 5.32 now seems to build and test fine on Alpine without modification 🎉
I'll do a bit more testing this week and keep some manually-generated Dockerfiles for this for publishing on Hub.
zakame commentedon Sep 8, 2020
For anyone who wants to help testing, I've pushed image build for 5.32-alpine and 5.32-alpine-threaded to the hub:
zakame commentedon Aug 6, 2022
Revisiting this one - I think we could just push out a
:alpineimage without issue, as long as we document the obvious issues of glibc vs musl differences.zakame commentedon Jun 12, 2026
PR #24 has been significantly overhauled - I'm targeting to merge it soon during the 5.44 release. Testers welcome! 🙇