3 回答

TA貢獻(xiàn)1895條經(jīng)驗(yàn) 獲得超7個(gè)贊
因?yàn)榘惭b了docker我本地已經(jīng)沒(méi)有/usr/bin/php文件。
這時(shí)候,如果我需要使用php cli來(lái)執(zhí)行一個(gè)php,如何操作?
我想,可以ssh進(jìn)行php容器,然后在容器內(nèi)執(zhí)行 /usr/bin/php xxx.php
但是在phpstrom IDE中感覺(jué)使用起來(lái)不太方便。
然后我看到phpstorm有個(gè) docker的plugin,需要配置個(gè)docker-machine
問(wèn)題來(lái)了,我開(kāi)發(fā)環(huán)境是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.
- 3 回答
- 0 關(guān)注
- 1219 瀏覽
添加回答
舉報(bào)