'How to build a docker image on top of Jelastic jelastic/nginxphp?
For local development I try to build a docker image on top of jelastic/nginxphp as suggested in https://docs.jelastic.com/building-custom-container/ . Unfortunately I can not see any server (php-fpm or nginx) once I start the image.
docker run -p 8080:80 jelastic/nginxphp:1.14.2-php-7.2.9
➜ ~ curl 127.0.0.1:8080
curl: (52) Empty reply from server
I can see that systemd gets started, but I do not see php-fpm or nginx.
➜ ~ docker exec 55a454cf01ad ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 191276 10172 ? Ssl 07:58 0:00 /usr/bin/qemu-x86_64 /usr/lib/systemd/systemd
root 9 0.0 0.0 200788 10408 ? Rl+ Nov25 0:00 /usr/bin/ps aux
I wonder how to build my app on top of this image. Is there any documentation or is there an example for jelastic/nginxphp?
Solution 1:[1]
Generally, the jelastic/nginxphp docker image is built in a quite different way from, for example, the Nginx repo from the Docker library - that's because it was designed to be launched on Virtuozzo DevOps platform and have the support of all the functionality and automatizations provided there.
If you run
'docker inspect jelastic/nginxphp:1.14.2-php-7.2.9', you can see
"Cmd": [
"/usr/lib/systemd/systemd"
],
To run the image locally, you need to override the CMD during launch
docker run -p 8080:80 jelastic/nginxphp:1.14.2-php-7.2.9 /usr/sbin/nginx '-g daemon off;'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jelastic |
