duckdb / duckdb/duckdb-node

Nodejs app crash when running inside node:18.17-alpine3.18 container

Open
#43 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
91
Forks
36
PR merge metrics
No merged PRs in 30d

Description

same app in running as expected in windows machine but when deploying it into node:18.17-alpine3.18 container it crashes
i removed the duckDb code and everything works.

Here is the code that causes the crash:

return new Promise(async (resolve, reject) => {
try {
let query = `
INSTALL httpfs;
LOAD httpfs;
`;
this.db = new duckdb.Database(':memory:');
this.db.all(query, (err, res) => {
if (err) {
reject(err);
return;
}
resolve(res);
});
} catch (error) {
reject(error);
}
});

did someone encountered this kind of problem?

this is my dockerfile:

FROM node:18.17-alpine3.18 AS production

ENV DISPLAY=:1.0
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

WORKDIR /usr/src/app

COPY package*.json ./
COPY tsconfig*.json ./

COPY src /usr/src/app/src
COPY config /usr/src/app/config

RUN apk add libc6-compat
RUN apk add gcompat

RUN npm install glob rimraf
RUN npm install --only=production
RUN npm run build
CMD uname -m && npm run start:prod

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.