React build in Docker container fails after macOS Big Sur update

  build, containers, docker, macos-big-sur, reactjs

After update to macOS Big Sur I am not able to build React inside a Docker container.

 => ERROR [base_build 9/9] RUN npm run build                                                                                                                                    94.4s 
------                                                                                                                                                                                
 > [base_build 9/9] RUN npm run build:                                                                                                                                                
#23 1.110 
#23 1.110 > [email protected] build /app
#23 1.110 > react-scripts build
#23 1.110 
#23 4.913 Creating an optimized production build...
#23 93.67 The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
#23 93.98 npm ERR! code ELIFECYCLE
#23 93.98 npm ERR! errno 1
#23 94.01 npm ERR! [email protected] build: `react-scripts build`
#23 94.01 npm ERR! Exit status 1
#23 94.01 npm ERR! 
#23 94.01 npm ERR! Failed at the [email protected] build script.
#23 94.01 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#23 94.18 
#23 94.18 npm ERR! A complete log of this run can be found in:
#23 94.19 npm ERR!     /root/.npm/_logs/2021-05-12T07_02_11_162Z-debug.log
------
executor failed running [/bin/sh -c npm run build]: exit code: 1

Source: Docker Questions

LEAVE A COMMENT