The Problem:
A Docker build process is failing and exiting with error code 139. The build involves running a command that includes ‘npm install’ and ‘npm run build’ within a Docker container. The error message includes an assertion failure related to ‘std::unique_ptr’ and ‘uv_thread_create’ in the ‘node_platform.cc’ file. The build was previously working successfully, and there is sufficient memory available on the system.
The Solutions:
Solution 1: Increase User Process Count
Before executing the `npm install` command, run the following command to increase the user process count:
“`console
ulimit -u 1024
“`
This step addresses resource (ulimit) constraints that may be causing the build to fail and exit with error code 139.
Q&A
Docker build fails and exit with error code 139
Try running before npm install: ulimit -u 1024
to increase user process count.
Video Explanation:
The following video, titled "Docker Failed To Initialize | Docker Desktop Is Shutting Down ...", provides additional insights and in-depth exploration related to the topics discussed in this post.
This video provides further insights and detailed explanations related to the content discussed in the article.
The following video, titled "Docker Failed To Initialize | Docker Desktop Is Shutting Down ...", provides additional insights and in-depth exploration related to the topics discussed in this post.
This video provides further insights and detailed explanations related to the content discussed in the article.