shinsenter/cakephp4生产就绪的PHP/CakePHP Docker镜像,具备自动CakePHP安装功能。支持通过环境变量轻松配置PHP和PHP-FPM设置,无需重建镜像即可调整配置。包含最新版Composer,便于快速启动项目。提供Debian和Alpine两种版本,满足不同环境需求。
当挂载空目录到容器时,容器会自动下载框架源码,快速搭建新项目。
shellmkdir cakephp4
shelldocker run -p 80:80 -p 443:443 -p 443:443/udp \ -v ./cakephp4:/var/www/html \ shinsenter/cakephp4:latest
容器会检测到挂载到/var/www/html的空目录,并自动克隆框架源码到其中。
将主机上的现有CakePHP项目代码目录挂载到容器的/var/www/html目录即可运行现有应用。由于源码以卷方式挂载,主机上的代码变更会实时反映到容器内,便于开发和测试。
shelldocker run -p 80:80 -p 443:443 -p 443:443/udp \ -v /path/to/your/existing/cakephp:/var/www/html \ shinsenter/cakephp4:latest
镜像包含预生成的SSL测试证书,位于/etc/ssl/site/server.crt和/etc/ssl/site/server.key。生产环境中需替换为自定义有效证书,以下是三种配置方式:
DockerfileFROM shinsenter/cakephp4:latest # 复制自定义证书到容器 COPY my_domain.crt /etc/ssl/site/server.crt COPY my_domain.key /etc/ssl/site/server.key # 添加其他指令,例如: # ADD --chown=$APP_USER:$APP_GROUP ./cakephp4/ /var/www/html/
shelldocker run -p 80:80 -p 443:443 -p 443:443/udp \ -v ./cakephp4:/var/www/html \ -v ./my_domain.crt:/etc/ssl/site/server.crt \ -v ./my_domain.key:/etc/ssl/site/server.key \ shinsenter/cakephp4:latest
yamlservices: web: image: shinsenter/cakephp4:latest volumes: - ./cakephp4:/var/www/html - ./my_domain.crt:/etc/ssl/site/server.crt - ./my_domain.key:/etc/ssl/site/server.key
由于每日构建会更新相同标签的镜像,为确保生产环境稳定性,建议将latest标签镜像标记为稳定版本:
shelldocker pull shinsenter/cakephp4:latest docker tag shinsenter/cakephp4:latest your-repo/cakephp4:stable docker push your-repo/cakephp4:stable
之后使用your-repo/cakephp4:stable作为生产环境基础镜像。
如发现镜像有用,可通过******,或在GitHub提交issue。
本项目采用GNU General Public License v3.0许可证。使用或借鉴本项目时,请给予适当引用。
来自越南 🇻🇳 的爱心制作。
manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务