Tengo una aplicación creada con docker-compose, que funcionaba perfectamente hasta que hice una nueva:
docker-compose -f docker-compose-dev.yml up -d --build .
Aunque no he tocado la configuración de mi servicio 'cliente', ahora se rompe con el siguiente registro:
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. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! client@0.1.0 start: `react-scripts start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the client@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-17T21_19_15_181Z-debug.log > client@0.1.0 start /usr/src/app > react-scripts start El servicio ahora nginx no puede conectarse aguas arriba con el 'cliente'.
... client: build: context: ./services/client dockerfile: Dockerfile-dev volumes: - './services/client:/usr/src/app' - '/usr/src/app/node_modules' ports: - 3000:3000 env_file: - .env-dev depends_on: - web¿Existe alguna solucion para esto?
Las redes Docker son muy sensibles.
Lo que me solucionó, después de reconstruir:
$ docker rmi $(docker images --filter "dangling=true" -q --no-trunc) --forceentonces:
$ docker-compose -f docker-compose-dev.yml downy finalmente:
$docker-compose -f docker-compose-dev.yml up -d