Is there a best practice on setting up glibc on docker alpine linux base image with correct paths so any spawned process can correctly reference the location of the installed libc libraries?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
Yes there is,
I've used a custom built glibc to install a JRE on it.
You can find it here
You can use wget or curl to get the code and apk to install them
UPDATED commands see comments below
It worked perfectly for me
apk add libgcc
It seems that this makes
glibc
available. This increases the size of the image by a few MB.The best practice is to not install glibc on Alpine Linux. It uses musl libc instead, a lightweight, fast, simple and standards-conform C library (i.e. everything that glibc is not).
Instead of installing glibc on Alpine, build and/or package your dependent software packages and libraries for Alpine.
For python packages, the setup.py program will often recompile, rather than downloading a prebuild binary, when run on Alpine.
For java, use alpine openjdk instead of Oracle.
For faiss, and other numpy-dependent libraries in python (copied from https://gist.github.com/orenitamar/f29fb15db3b0d13178c1c4dd611adce2)