Nodejs app crash when running inside node:18.17-alpine3.18 container
- 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.