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

因为安装了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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值