Skip to content

Conversation

sstewart199
Copy link

@sstewart199 sstewart199 commented Jan 28, 2020

Installing pouchdb-server on Alpine Linux based images

You need the following packages:

  • build-base
  • python
apk --no-cache add --virtual builds-deps build-base python

We recommend using no-cache and virtual, in order to keep the resulting container size same.

Alpine linux based images use musl libc instead of the standard glibc and thus are not compatible with compiled binaries. node-pre-gyp currently does not test the pre-compiled binaries to be ABI-compatible and thus you may see segfaults. We are working to resolve this issue.

As a workaround, In alpine based images, force recompiling the leveldown native addon after a npm install with this command: npm rebuild leveldown --build-from-source.

RUN apk --no-cache add --virtual builds-deps build-base python
RUN yarn --production && npm rebuild leveldown --build-from-source
CMD node node_modules/pouchdb-server -p 5432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant