Postgresql 将Docker配置为即使在非http请求中也使用代理服务器
为了将docker配置为使用代理,我遵循了以下步骤:Postgresql 将Docker配置为即使在非http请求中也使用代理服务器,postgresql,docker,proxy,Postgresql,Docker,Proxy,为了将docker配置为使用代理,我遵循了以下步骤: $ cat /etc/systemd/system/docker.service.d/http-proxy.conf [Service] Environment="HTTP_PROXY=http://10.2.8.234:3142" Environment="HTTPS_PROXY=https://10.2.8.234:3142" $ sudo systemctl daemon-reload $ sud
$ cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.2.8.234:3142"
Environment="HTTPS_PROXY=https://10.2.8.234:3142"
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
当我在dockers映像中使用apt get
、curl
、wget
等时,它工作正常,但当我连接到internet中的postgresql
服务器(使用端口5432)时,由于流量未通过代理而失败
如何通过代理重定向所有docker流量?不管是http还是no。你并不是在问docker。例如,您正在询问如何安排您的postgres客户端使用代理服务器。忽略docker,这可能吗?我认为postgres客户端不支持使用http代理进行连接。