pages-gem
pages-gem copied to clipboard
[Docker/alpine]: missing dependency for nokogiri
Before submitting an issue, please be sure to
- [x] Read the contributing instructions
- [x] Update to the latest Gem version (run
bundle update github-pages
)
This issue affects
- [ ] The site generated by GitHub Pages
- [x] Building sites locally
The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.
What did you do (e.g., steps to reproduce)
- enable the
jemoji
plugin in _config.yml -
make image_alpine
-
SITE=/path/to/site make server
What did you expect to happen?
a running local server
What happened instead?
build failed because the nokogiri
gem couldn't access the shared library ld-linux-aarch64.so.1
Additional information
-
Nokogiri depends on
glibc
- Linux aarch64-linux (req: glibc >= 2.29) including musl/Alpine - Nokogiri docs on supported platforms
-
From the Nokogiri docs on musl having error loading shared library
Musl-based systems like Alpine may not have a glibc-compatible library installed, leading to problems running the precompiled native gems.
-
and also the solution
Install the glibc compatibility layer:
apk add gcompat
NB this does not affect the image built from Dockerfile.alpine@e9d9768.
However I feel it would be nice to include the required library in the image because
- emoji are used quite often while blogging today
- most users of the Docker images are likely to prefer the Alpine one for local development thanks to it's smaller size on disk