github / github/pages-gem

[Docker/alpine]: missing dependency for nokogiri

Open
#839 0 comments 12 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
1.9k
Forks
360
PR merge metrics
No merged PRs in 30d

Description

### Before submitting an issue, please be sure to

- [x] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/docs/CONTRIBUTING.md#contributing-to-the-github-pages-gem)
- [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](https://github.com/github/pages-gem/blob/master/docs/SUPPORT.md).*

### What did you do (e.g., steps to reproduce)
1. enable the [`jemoji` plugin](//rubygems.org/gems/jemoji) in _\_config.yml_
2. `make image_alpine`
3. `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](//rubygems.org/gems/nokogiri) 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](https://nokogiri.org/tutorials/installing_nokogiri.html#supported-platforms)

- From the Nokogiri docs on [musl having error loading shared library](https://nokogiri.org/tutorials/installing_nokogiri.html#linux-musl-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](https://nokogiri.org/tutorials/installing_nokogiri.html#solution_3)
> Install the glibc compatibility layer:
> ```apk add gcompat```

***

**NB** this does not affect the image built from [Dockerfile.alpine@e9d9768](https://github.com/github/pages-gem/blob/e9d9768b21a17deb123ea80f67a4df2c2c5c439b/Dockerfile.alpine).

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.