-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appmetrics doesn't work on alpine linux #438
Comments
Also having this issue running alpine-node:6.4.0
|
I've run into this issue also and had to do couple of workarounds:
This is the ending Dockerfile: FROM node:8-alpine as build
ENV YARN_VERSION 1.0.2
RUN apk add --no-cache --virtual build-dependencies --update \
curl \
python \
build-base \
libexecinfo-dev
RUN set -ex \
&& curl -o- -L https://yarnpkg.com/install.sh | sh -s -- --version $YARN_VERSION \
ARG PATH=/root/.yarn/bin:$PATH
ENV PATH /root/.yarn/bin:$PATH
ENV NODE_ENV production
ENV DOCKER_BUILD=true
COPY . /app/
WORKDIR /app
RUN yarn install
# Cleanup
RUN apk del build-dependencies
FROM node:8-alpine
RUN apk add --no-cache --virtual run-dependencies --update \
libc6-compat
COPY --from=build /root/.yarn /root/.yarn
COPY --from=build /app /app
WORKDIR /app
ENV PATH /root/.yarn/bin:$PATH
ENV START_COMMAND start
ENV PORT 8040
ENV NODE_ENV production
ENV LD_LIBRARY_PATH /app/node_modules/appmetrics
EXPOSE 8040
CMD npm start |
@noxxious Thanks for the info, use containers to deploy appmetrics is something we are looking at right now so this is very useful |
Duplicate of #454 |
@noxxious , could you please details of package - libc-compat, because I am unable to find that pakage |
@Nagasai-Aytha: It is called libc6-compat. |
Adding |
- Upgrade Node.js to latest LTS version `8.11.1` and use `govukpay/nodejs:8.11.1` image - Specify the new version in `.nvmrc` and `package.json` - Use `package-lock.json` instead of `npm-shrinkwrap.json` - Upgrade `appmetrics` library and initialisation (see RuntimeTools/appmetrics#438 (comment))
Because of musl instead of glibc I get:
I'm experimenting with self compiling on the node:6-alpine docker image but node-gyp fails to be able to compile with:
The text was updated successfully, but these errors were encountered: