As per the title, trying to build an image via dind worker (on jenkins running on kubernetes) and the RUN npm rebuild bcrypt --build-from-source command appears to get "stuck"; no additional logs to give more detail.
Remains stuck indefinitely (I've let it 'try' for over 6 hours)
Image build Logs:
10:58:57 Step 16/22 : RUN npm rebuild bcrypt --build-from-source
10:58:57 ---> Running in 0342d5df1122
10:59:00
10:59:00 > bcrypt@5.0.1 install /usr/src/app/node_modules/bcrypt
10:59:00 > node-pre-gyp install --fallback-to-build
I've tried changing dind image versions, adding/removing dockerfile dependencies, and some others.
NOTE this builds fine on my local with docker engine v20.10.12!
Any help is appreciated!
Additional info and running versions:
dind image: 17.12.1-dind (but I've also tried 18.x.x-dind, 19.x.x-dind, and 20.x.x-dind)
jenkins version: 2.330
bcrypt version: 5.0.1
npm image version: 12.22.9-alpine
Dockerfile (with some redactions):
FROM node:12.22.9-alpine
RUN apk update && apk upgrade && \
apk add --no-cache --virtual .builds-deps bash git build-base python3 make g++ openssh
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN npm install --production
RUN npm rebuild bcrypt --build-from-source # <-- this is where it fails
RUN apk del make g++ python3 openssh
COPY src /usr/src/app/src
RUN adduser -S -u 10001 -g nodejs nodejs && chmod +x /usr/src/app
EXPOSE 3000
CMD npm start
(Note that I've added some of these dependencies in my debugging; I don't actually need them)
Additionally, this works fine with bcrypt version 2.0.1 and node 10.16.3-alpine image but I wanted to upgrade node version and therefore had to upgrade bcrypt
Thanks!
Edit: Updated some words