docker-java-node icon indicating copy to clipboard operation
docker-java-node copied to clipboard

fail to create docker image from timbru31/java-node:11-jdk-14

Open samiboy opened this issue 3 years ago • 12 comments

From the last week it starting to fail, we got the following error when try to create docker image, run from centos 7 (amd64):

15:20:53 Step 1/28 : FROM timbru31/java-node:11-jdk-14 as attbuilder 15:20:53 ---> 171895027082 15:20:53 Step 2/28 : RUN npm install -g node-gyp 15:20:54 ---> Running in a8c1274c96e7 15:20:56 [91mnode[1]: ../src/node_platform.cc:61:std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed. 15:20:56 [0m[91m 1: 0xa3aaf0 node::Abort() [node] 15:20:56 [0m[91m 2: 0xa3ab6e [node] 15:20:56 [0m[91m 3: 0xaab32e [node] 15:20:56 [0m[91m 4: 0xaab3f6 node::NodePlatform::NodePlatform(int, v8::TracingController*) [node] 15:20:56 [0m[91m 5: 0xa034c6 node::InitializeOncePerProcess(int, char**) [node] 15:20:56 [0m[91m 6: 0xa03711 node::Start(int, char**) [node] 15:20:56 7: 0x7fbf4bf26d90 [/lib/x86_64-linux-gnu/libc.so.6] 15:20:56 [0m[91m 8: 0x7fbf4bf26e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 15:20:56 [0m[91m 9: 0x98c58c [node] 15:20:56 [0mThe command '/bin/bash -o pipefail -c npm install -g node-gyp' returned a non-zero code: 139

samiboy avatar Jun 06 '22 13:06 samiboy

Thanks for your report. I'll try to reproduce this.

timbru31 avatar Jun 07 '22 08:06 timbru31

Works fine for me, can you give me the exact SHA256 you are using? If possible also the Dockerfile you are using.

image

timbru31 avatar Jun 07 '22 09:06 timbru31

Looks like we have a resource issue. can be close. Thank you!

samiboy avatar Jun 07 '22 14:06 samiboy

Hi, I am facing the same error with latest version - fail to create docker image from timbru31/java-node

node[1]: ../src/node_platform.cc:61:std::unique_ptr node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed. 1: 0xb09c10 node::Abort() [node] 2: 0xb09c8e [node] 3: 0xb794ce [node] 4: 0xb79596 node::NodePlatform::NodePlatform(int, v8::TracingController*) [node] 5: 0xacd0e9 node::InitializeOncePerProcess(int, char**, node::InitializationSettingsFlags, node::ProcessFlags::Flags) [node] 6: 0xacd399 node::Start(int, char**) [node] 7: 0x7f6f70d79d90 [/lib/x86_64-linux-gnu/libc.so.6] 8: 0x7f6f70d79e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6] 9: 0xa4067c [node] The command '/bin/bash -o pipefail -c npm install' returned a non-zero code: 139

virnahar avatar Jun 10 '22 07:06 virnahar

Did you find how to solve it?

samiboy avatar Jun 11 '22 20:06 samiboy

We still didn't find how to solve it, our SHA256 sha256:b822007d34d33436001189f478e5be1d4241b918fb14324865162414501fcf64

samiboy avatar Jun 14 '22 11:06 samiboy

We try to use with a specific last tag and still get same error, our docker file:

FROM timbru31/java-node:11-jdk-14 as attbuilder

RUN npm install -g node-gyp RUN apt-get update -y RUN apt-get install -y python3-pip python-dev build-essential RUN mkdir -p /build

COPY ./package.json /build/ COPY ./package-lock.json /build/ COPY ./.eslintrc /build/

WORKDIR /build RUN npm set registry http://artifacts.cloud.**** RUN npm install

Bundle app source

COPY . /build

RUN npm run lint RUN rm .eslintrc

Build app for production

RUN npm run build RUN npm run test

FROM timbru31/java-node:11-jdk-14

RUN adduser --disabled-password --gecos '' app

ENV user app

Run the image as a non-root user

USER $user

Create app directory

RUN mkdir -p /home/$user/src WORKDIR /home/$user/src LABEL Name="service" LABEL Version="1.0.0.0"

COPY --from=attbuilder /build ./

EXPOSE 5000

ENV NODE_ENV production

CMD ["node", "./dist/server.js"]

When I running it from my OSX the image is created but not on our Jenkins machine...

samiboy avatar Jun 14 '22 11:06 samiboy

using FROM timbru31/java-node:8-jre-12 worked.

virnahar avatar Jun 14 '22 11:06 virnahar

Please note that Node.js v12 is EOL and not maintained anymore, I'd advise not to use this anymore.

timbru31 avatar Jun 14 '22 16:06 timbru31

When I running it from my OSX the image is created but not on our Jenkins machine...

Have you checked the installed Docker version on your Jenkins machine? This sounds like that one is too old.

timbru31 avatar Jun 14 '22 16:06 timbru31

Thank you . I will check and update if it works

samiboy avatar Jun 15 '22 06:06 samiboy

Hi, this issue I think is due to this release in Docker-library https://github.com/docker-library/official-images/pull/12516 on 27th May. The newer Ubuntu 22.04 includes a newer glibc that does not work with older Docker hosts. For example, in dir docker-java-node/11/jdk/14, first line FROM eclipse-temurin:11-jdk should be changed to FROM eclipse-temurin:11-jdk-focal using Ubuntu 20.04-focal for a stable version. Our service get back to work after changing this.

xiaoyu-que avatar Jul 22 '22 03:07 xiaoyu-que

Closing due to staleness. If the issue persists, please feel free to create a new one!
Thank you for your contributions.

timbru31 avatar Feb 13 '23 10:02 timbru31