gpt4 book ai didi

docker:来自守护进程的错误响应:驱动程序在端点上编程外部连接失败

转载 作者:行者123 更新时间:2023-12-02 20:00:25 55 4
gpt4 key购买 nike

我在 Ubuntu 18.04 上尝试,尝试运行 docker 示例遵循此文档:
https://www.learnitguide.net/2018/06/write-dockerfile-to-build-own-images.html

docker run -d -it --name myweb80012 -p 192.168.2.1:8001:8001 myserver_new 

但我收到此错误:
docker: Error response from daemon: driver failed programming external connectivity on endpoint myweb80012 (94a73a664dd3b9c9dc59b750e70d157568f4d4551f733c29d5f86c7e0db287b8): Error starting userland proxy: listen tcp 192.168.2.1:8001: bind: cannot assign requested address.

我的 docker 版本
  # docker -v
Docker version 18.09.0, build 4d60db4

#sudo docker version
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:49:01 2018
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:16:44 2018
OS/Arch: linux/amd64
Experimental: false

如何解决这个问题?

最佳答案

您正在尝试绑定(bind)到主机上任何接口(interface)上都不存在的 IP 地址。从端口发布中删除 IP 地址或使用主机上存在的 IP 地址:

docker run -d -it --name myweb80012 -p 8001:8001 myserver_new

或类似环回的东西:
docker run -d -it --name myweb80012 -p 127.0.0.1:8001:8001 myserver_new 

关于docker:来自守护进程的错误响应:驱动程序在端点上编程外部连接失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54021678/

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