Consider the Dockerfile
FROM node:14-alpine
RUN apk --no-cache add gcc libc-dev libressl-dev
RUN apk --no-cache add --virtual .builds-deps build-base
RUN apk --no-cache add make curl-dev g++
RUN apk --no-cache add python3 py3-pip libgit2-dev
COPY . /app
RUN ls /app/
WORKDIR /app/
RUN npm i
When building the Container , the output is:
> nodegit@0.27.0 postinstall /app/node_modules/nodegit
> node lifecycleScripts/postinstall
[nodegit] WARN - Could not finish postinstall
Error: Command failed: node "/app/node_modules/nodegit/dist/nodegit.js"
/app/node_modules/nodegit/dist/nodegit.js:16
throw ex;
^
Error: Error loading shared library libgssapi_krb5.so.2: No such file or directory (needed by /app/node_modules/nodegit/build/Release/nodegit.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/app/node_modules/nodegit/dist/nodegit.js:12:12)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
code: 'ERR_DLOPEN_FAILED'
}
at ChildProcess.exithandler (child_process.js:383:12)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {
killed: false,
code: 1,
signal: null,
cmd: 'node "/app/node_modules/nodegit/dist/nodegit.js"'
}
> aws-sdk@2.964.0 postinstall /app/node_modules/aws-sdk
> node scripts/check-node-version.js
Any idea what's missing ?