Merge pull request #2066 from PeterDaveHello/UpdateREADME.md

docs: update shared libs section for Alpine 3.19+
This commit is contained in:
Laurent Goderre 2024-04-12 12:58:54 -04:00 committed by GitHub
commit 8421a51f8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 3 deletions

View File

@ -184,11 +184,19 @@ requirements. However, most software doesn't have an issue with this, so this
variant is usually a very safe choice. See
[this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897)
for more discussion of the issues that might arise and some pro/con comparisons
of using Alpine-based images. One common issue that may arise is a missing shared
library required for use of `process.dlopen`. To add the missing shared libraries
to your image, adding the [`libc6-compat`](https://pkgs.alpinelinux.org/package/edge/main/x86/libc6-compat)
of using Alpine-based images.
One common issue that may arise is a missing shared library required for use of
`process.dlopen`. To add the missing shared libraries to your image:
- For Alpine v3.18 and earlier, adding the
[`libc6-compat`](https://pkgs.alpinelinux.org/package/v3.18/main/x86/libc6-compat)
package in your Dockerfile is recommended: `apk add --no-cache libc6-compat`
- Starting from Alpine v3.19, you can use the
[`gcompat`](https://pkgs.alpinelinux.org/package/v3.19/main/x86/gcompat) package
to add the missing shared libraries: `apk add --no-cache gcompat`
To minimize image size, it's uncommon for additional related tools
(such as `git` or `bash`) to be included in Alpine-based images. Using this
image as a base, add the things you need in your own Dockerfile