News for hackers. Stuff that matters.
Re:Alpine Linux 3.13 by hn_acc_2 on Thursday January 14, 2021 @01:55PM (#25780539)
Another "I want to love Alpine but can't" user here.

Their use of musl libc makes it a very poor choice for running python in a container, because it forces a lot of manual rebuilding since the PyPi wheels don't work on Alpine, among other issues [1]

[1] https://pythonspeed.com/articles/alpine-docker-python/

Re:Alpine Linux 3.13 by turminal on Thursday January 14, 2021 @02:27PM (#25781071)
I believe Alpine isn't meant to be used with pip, npm, and the like. Instead you are encouraged to create alpine packages out of your dependecies and submit them upstream. Writing a new package is completely trivial in Alpine, that's one of the things that made me switch to it.
Re:Alpine Linux 3.13 by hn_acc_2 on Thursday January 14, 2021 @04:38PM (#25782980)
Unfortunately the Python package ecosystem is enough of a headache.

Now we add additional complication "OK, these pip package authors have upstreamed Alpine packages, and these other ones are only on PyPi".

Maybe this approach would work if you can keep your Python dependencies to a small list of well-maintained packages

Re:Alpine Linux 3.13 by nenolod on Friday January 15, 2021 @05:06AM (#25789033)
The good news is that there is work in progress to untangle the mess with PyPI wheels and musl. But it is easy enough to just not use wheels.
Re:Alpine Linux 3.13 by saagarjha on Thursday January 14, 2021 @04:12PM (#25782625)
They do work, though.
Re:Alpine Linux 3.13 by DiabloD3 on Thursday January 14, 2021 @02:04PM (#25780661)
So just use the glibc compat layer, or also install glibc.

https://wiki.alpinelinux.org/wiki/Running_glibc_programs

Re:Alpine Linux 3.13 by hn_acc_2 on Thursday January 14, 2021 @04:35PM (#25782944)
If you ask me, installing glibc / compat layers defeats the purpose of using Alpine, especially since Alpine ultimately only saved me ~50 MB on image size versus a similarly configured debian:slim-buster image
Re:Alpine Linux 3.13 by ossusermivami on Thursday January 14, 2021 @07:19PM (#25785123)
I use UBI minimal docker image from redhat which is based on RHEL but free from license :

https://access.redhat.com/documentation/en-us/red_hat_enterp...

Pretty small and has most of the things i need :

Minimal images are about 92M on disk and 32M compressed. This makes it less than half the size of the standard images.

Re:Alpine Linux 3.13 by nenolod on Thursday January 14, 2021 @02:16PM (#25780861)
this page really should be updated, at this point all you basically have to do is `apk add gcompat`.
Re:Alpine Linux 3.13 by chrisjc on Thursday January 14, 2021 @01:58PM (#25780581)
Out of curiosity, which container have you settled on instead? debian:buster-slim?
Re:Alpine Linux 3.13 by hn_acc_2 on Thursday January 14, 2021 @04:25PM (#25782807)
I did settle on Debian, using i.e. python:3.9-slim-buster (though you can just as easily start from debian and install your python version)