[英]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/ .对于本地开发,我尝试按照https://docs.jelastic.com/building-custom-container/ 中的建议在 jelastic /nginxphp 之上构建一个 docker 图像。 Unfortunately I can not see any server (php-fpm or nginx) once I start the image.
不幸的是,启动图像后我看不到任何服务器(php-fpm 或 nginx)。
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.我可以看到 systemd 启动了,但我没有看到 php-fpm 或 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
?是否有任何文档或是否有
jelastic/nginxphp
的示例?
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.通常,jelastic/nginxphp docker 映像的构建方式与 Docker 库中的 Nginx 回购完全不同——这是因为它被设计为在 Virtuozzo DevOps 平台上启动,并支持所有功能和自动化在那里提供。
If you run 'docker inspect jelastic/nginxphp:1.14.2-php-7.2.9'
, you can see如果你运行
'docker inspect jelastic/nginxphp:1.14.2-php-7.2.9'
,你可以看到
"Cmd": [
"/usr/lib/systemd/systemd"
],
To run the image locally, you need to override the CMD during launch要在本地运行图像,您需要在启动期间覆盖 CMD
docker run -p 8080:80 jelastic/nginxphp:1.14.2-php-7.2.9 /usr/sbin/nginx '-g daemon off;'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.