From 85591191fb940777d836f0d19847798f92ed6bdb Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Fri, 12 Apr 2024 00:18:55 +0800 Subject: [PATCH] docs: update shared libs section for Alpine 3.19+ Starting from Alpine 3.19, the `gcompat` package should be used instead of `libc6-compat` to include missing shared libraries required for `process.dlopen`. This change is based on the latest Alpine Linux 3.19.0 release notes: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.19.0 --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 341f6cd4e..d85e3a10e 100644 --- a/README.md +++ b/README.md @@ -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