gpt4 book ai didi

Docker 容器 : Access private endpoint that requires VPN - SSL_ERROR_SYSCALL

转载 作者:行者123 更新时间:2023-12-04 22:42:41 25 4
gpt4 key购买 nike

在我的本地主机上是 在 VPN 上 .如果我跑curl https://foo.bar/api/v1/19我会得到一堆返回的数据。
然后我在本地主机上启动一个带有安装证书的 docker 容器,如下所示:

docker run \
-p 6709:6709 -p 6708:6708 \
-v /etc/ssl/certs:/etc/ssl/certs:rw \
IMAGE \
"update-ca-certificates"
从容器内,我无法访问同一个端点
root@1349b12fdff2:/# curl -v https://foo.bar/api/v1/19
* Trying 10.132.123.123...
* TCP_NODELAY set
* Connected to foo.bar (10.132.123.123) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to foo.bar:443
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to foo.bar:443
有任何想法吗?

最佳答案

我发现解决方案是使用 --net=host 运行容器

关于Docker 容器 : Access private endpoint that requires VPN - SSL_ERROR_SYSCALL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64379935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com