Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker 如何在dinghy VM启动时关闭dinghy http代理_Docker_Dinghy - Fatal编程技术网

Docker 如何在dinghy VM启动时关闭dinghy http代理

Docker 如何在dinghy VM启动时关闭dinghy http代理,docker,dinghy,Docker,Dinghy,我使用虚拟机作为docker开发环境 当我启动dinghy VM(dinghy up)时,也会启动dinghy http代理容器 如何在默认情况下关闭它?Edit-1 看起来小艇的代码总是在开始时装载集装箱。您现在可以手动修复它 打开/usr/local/cillar/dinghy/4.5.0/cli/cli.rb。4.5.0将根据您的版本进行更改 在第227行附近,您将发现 http_proxy.up(expose_proxy: !!proxy) 您需要对这一行进行注释。然后销毁并重新创建虚

我使用虚拟机作为docker开发环境

当我启动dinghy VM(
dinghy up
)时,也会启动dinghy http代理容器


如何在默认情况下关闭它?

Edit-1

看起来小艇的代码总是在开始时装载集装箱。您现在可以手动修复它

打开
/usr/local/cillar/dinghy/4.5.0/cli/cli.rb
4.5.0
将根据您的版本进行更改

在第227行附近,您将发现

http_proxy.up(expose_proxy: !!proxy)
您需要对这一行进行注释。然后销毁并重新创建虚拟机

dinghy destroy
dinghy create
您还可以在github上打开请求,要求作者提供这样一个选项。在
cat~/.dinghy/preferences.yml

---
:preferences:
  :proxy_disabled: true
  :fsevents_disabled: false
  :dns_disabled: true
  :dns: false
  :create:
    provider: virtualbox
但我尝试了所有的选择,但都不起作用。因此,最终的解决方案是在没有任何条件的情况下,对提出容器的行进行注释

原始答案

这只会在VM启动后停止容器,如果您重新启动或停止,那么下次代理将再次启动

您需要在下面使用

$ dhingy ssh

$ docker update --restart no dinghy-http-proxy
$ docker stop dinghy-http-proxy
假设容器名为
dinghyttpproxy
,如果它有一个id,那么您需要使用
docker ps

@DmitryRomashov,现在请检查更新的答案我关闭了
dns
proxy\u禁用了
首选项,并且在
dinghy up
命令后,dinghy http proxy容器不会再次启动。