Is there a best practice on setting up glibc on docker alpine linux base image?

匿名 (未验证) 提交于 2019-12-03 03:06:01

问题:

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?

回答1:

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

apk --no-cache add ca-certificates wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-2.23-r3.apk apk add glibc-2.23-r3.apk 

It worked perfectly for me



回答2:

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).

Why do you need glibc on Alpine?



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!