为了账号安全,请及时绑定邮箱和手机立即绑定

请问该如何制作一个定制的 PHP 基础 Docker 镜像?

请问该如何制作一个定制的 PHP 基础 Docker 镜像?

PHP
30秒到达战场 2019-09-13 15:10:16
如何制作一个定制的 PHP 基础 Docker 镜像
查看完整描述

3 回答

?
蝴蝶刀刀

TA贡献1801条经验 获得超8个赞

因为安装了docker我本地已经没有/usr/bin/php文件。
这时候,如果我需要使用php cli来执行一个php,如何操作?
我想,可以ssh进行php容器,然后在容器内执行 /usr/bin/php xxx.php
但是在phpstrom IDE中感觉使用起来不太方便。
然后我看到phpstorm有个 docker的plugin,需要配置个docker-machine
问题来了,我开发环境是ubuntu 16.04

$ docker-machine create -d none --url="tcp://0.0.0.0:2375" default

$ docker-machine env default

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "0.0.0.0:2375": dial tcp 0.0.0.0:2375: getsockopt: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.


查看完整回答
反对 回复 2019-09-17
  • 3 回答
  • 0 关注
  • 373 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信