node-LDAP icon indicating copy to clipboard operation
node-LDAP copied to clipboard

Deploying in Docker Environment

Open jprivillaso opened this issue 7 years ago • 1 comments

Hi,

Is there any place where I can find how to build a Docker image with Node and this library ? I'm having issues running it with node:8.7.0-alpine. I get an error

Error loading shared library /usr/src/app/node_modules/ldap-client/build/Release/LDAPCnx.node: Exec format error

I'd appreciate any help

jprivillaso avatar Nov 14 '18 13:11 jprivillaso

Hi @jprivillaso,

You are probably missing the C++ libs. Here's my Dockerfile with node:9-jessie

FROM node:9-jessie

RUN apt-get update && apt-get install -y libldap2-dev

RUN mkdir -p /usr/src/app
ADD package.json /usr/src/app/package.json
RUN cd /usr/src/app && npm install --production

COPY . /usr/src/app/

WORKDIR /usr/src/app

EXPOSE 3000

CMD npm run start

tpina avatar Dec 31 '18 07:12 tpina