Can not start php-fpm
Closed this issue · 2 comments
Can you tell me how to fix this?
Attaching to docker-nginx-php-fpm-7-master_nginx_1, docker-nginx-php-fpm-7-master_php-fpm_1
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: using the "epoll" event method
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: nginx/1.12.2
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: OS: Linux 4.9.87-linuxkit-aufs
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: start worker processes
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: start worker process 5
nginx_1 | 2018/07/18 13:56:06 [notice] 1#0: start worker process 6
php-fpm_1 | [18-Jul-2018 13:56:07] ERROR: Unable to create the PID file (/run/php-fpm/php-fpm.pid).: No such file or directory (2)
php-fpm_1 | [18-Jul-2018 13:56:07] ERROR: FPM initialization failed
docker-nginx-php-fpm-7-master_php-fpm_1 exited with code 78
I resolved this by modifying the .docker/php-fpm/Dockerfile to have "RUN mkdir -p /run/php-fpm" after the yum install steps.
Make sure you clear out the old images it with "docker rmi <imagename/hash>" to ensure it builds from scratch, otherwise it'll just keep trying to start up the old image.
Hi @adrawn,
Thanks for the fix. I'd updated this repository.