Docker npm Segmentation fault
#1
Thu, 2017-11-30 05:32
herald
-
- Offline
- 1 week 3 days ago
- 2017-11-29
Hi there!
I am running docker-ce on alpine 3.6.2-extend. Any other docker container runs ok but node related images container.
I want to create a ghost blog contaner, but it still can not starting. There is a fail echo 'Segmentation fault' when I into the container and run `npm -v` cmd.
Anybody knows why? How to fix it ?
----
I found a method to fix this problem. Because nodejs needs `paxctl` package. Reference: https://github.com/nodejs/docker-node/issues/588
so We have to build a new image base on ghost:alpine, the Dockerfile content is:
```
FROM ghost:alpine
RUN apk add --no-cache paxctl && paxctl -cm `which node`
```