在泊坞窗容器慢速网络性能(Slow network performance in Docker co

2019-09-28 20:45发布

我跑在OSX Yosemite和VirtualBox的最新泊坞窗/泊坞窗机,我试图连接到来自主机的容器中运行雷音环服务器加载速度慢如像加载时间超过1分钟以下是我的配置

泊坞窗1.12.0泊坞窗机VirtualBox的0.8.0 5.0.24

我的泊坞窗机

“ConfigVersion”:3, “驱动程序”:{ “的IPAddress”: “192.168.99.100”, “计算机名”: “缺省”, “SSHUser”: “搬运工”, “SSHPort”:49478 “SSHKeyPath”:“/卷/NASMAC/VMs/.docker/machine/machines/default/id_rsa “ ”StorePath中“: ”/Volumes/NASMAC/VMs/.docker/machine“, ”SwarmMaster“:假的, ”SwarmHost“:” TCP:// 0.0.0.0:3376" , “SwarmDiscovery”: “”, “VBoxManager”:{}, “HostInterfaces”:{}, “CPU”:1, “存储器”:1024, “DiskSize”:20000 “NatNicType”: “82540EM”, “Boot2DockerURL”: “”, “Boot2DockerImportVM”: “”, “HostDNSResolver”:假的, “HostOnlyCIDR”: “192.168.99.1/24”, “HostOnlyNicType”: “82540EM”, “HostOnlyPromiscMode”:“否认“ ”UIType“: ”无头“, ”NoShare“:假的, ”代理(DNSProxy)“:真实的, ”NoVTXCheck“:假} ”的DriverName“: ”VirtualBox的“, ”HostOptions“:{ ”驱动程序“: ”“,”存储器 “:0, ”磁盘“:0 ”EngineOptions“:{ ”ArbitraryFlags“:[], ”DNS“:NULL, ”GraphDir“: ”“, ”的Env“:[],的 ”IPv6“:假” InsecureRegistry “:[], ”标签“:[], ”LogLevel的“: ”“, ”StorageDriver“: ”“, ”SelinuxEnabled“:假的, ”TlsVerify“:真正的” 重 gistryMirror “:[], ”InstallURL“:” https://get.docker.com “}, ”SwarmOptions“:{ ”IsSwarm“:假, ”地址“: ”“, ”发现“: ”“,”代理“:假 “大师”:假的, “主机”: “TCP://0.0.0.0:3376”, “形象”: “群:最新的”, “战略”: “传播”, “心跳”:0, “过量使用”:0 “ArbitraryFlags”:[], “ArbitraryJoinFlags”:[] “的Env”:NULL, “IsExperimental”:假}, “AuthOptions”:{ “CertDir”:“/卷/ NASMAC / VMS / .docker /机/证书 “ ”CaCertPath“: ”/Volumes/NASMAC/VMs/.docker/machine/certs/ca.pem“, ”CaPrivateKeyPath“:” /Volumes/NASMAC/VMs/.docker/machine/certs /ca-key.pem “ ”CaCertRemotePath“: ”“, ”ServerCertPath“: ”/Volumes/NASMAC/VMs/.docker/machine/machines/default/server.pem“, ”ServerKeyPath“:”/卷/ NASMAC /VMs/.docker/machine/machines/default/server-key.pem”, “ClientKeyPath”: “/Volumes/NASMAC/VMs/.docker/machine/certs/key.pem”, “ServerCertRemotePath”: “”, “ServerKeyRemotePath”: “”, “ClientCertPath”: “/Volumes/NASMAC/VMs/.docker/machine/certs/cert.pem”, “ServerCertSANs”:[],“StoreP ATH“: ”/Volumes/NASMAC/VMs/.docker/machine/machines/default“}, ”名“: ”默认“}

我的搬运工图片

{ "Id": "819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136", "Created": "2016-08-28T23:35:03.957961657Z", "Path": "/bin/bash", "Args": [ "lein", "with-profile", "dev", "do", "start-dev" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 3586, "ExitCode": 0, "Error": "", "StartedAt": "2016-08-28T23:35:04.365339872Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:618b57a0e5d07030a3f869607928f5e167b53a6f250f76f88325799888dcac94", "ResolvConfPath": "/var/lib/docker/containers/819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136/resolv.conf", "HostnamePath": "/var/lib/docker/containers/819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136/hostname", "HostsPath": "/var/lib/docker/containers/819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136/hosts", "LogPath": "/var/lib/docker/containers/819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136/819132073e36a026222ad0da90899a0daf1e735ce0f8623202740b355556c136-json.log", "Name": "/lonely_ritchie", "RestartCount": 0, "Driver": "aufs", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": [ "/Users/kendallarneaud/Documents/Git/ngc-race-along.docker:/data" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "3000/tcp": [ { "HostIp": "", "HostPort": "" } ], "9000/tcp": [ { "HostIp": "", "HostPort": "" } ] }, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": true, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": -1, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0 }, "GraphDriver": { "Name": "aufs", "Data": null }, "Mounts": [ { "Source": "/Users/kendallarneaud/Documents/Git/ngc-race-along.docker", "Destination": "/data", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "819132073e36", "Domainname": "", "User": "", "AttachStdin": true, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "3000/tcp": {}, "9000/tcp": {} }, "Tty": true, "OpenStdin": true, "StdinOnce": true, "Env": [ "no_proxy=*.local, 169.254/16", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "HOME=/root", "JAVA_HOME=/usr/lib/jvm/java-7-oracle", "LEIN_ROOT=true", "LANG=C.UTF-8", "PYTHON_VERSION=2.7.9" ], "Cmd": [ "/bin/bash", "lein", "with-profile", "dev", "do", "start-dev" ], "Image": "rand/docker-clojurescript:latest", "Volumes": null, "WorkingDir": "/data", "Entrypoint": null, "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "8b5479b9b22a6d653509c99f9b291593ca7664339666cf40bee55044f3c1d778", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "3000/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "32773" } ], "9000/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "32772" } ] }, "SandboxKey": "/var/run/docker/netns/8b5479b9b22a", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "d4164a411f5ca1992eb724c4cd5cb2f013a1eb909b6d3e5f395d07df84ff34f2", "Gateway": "172.17.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "MacAddress": "02:42:ac:11:00:02", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "fb82d366a9a2ad010bda7cdf4e6cb33f083a678756cfdfed01f90d3d2c317dfa", "EndpointID": "d4164a411f5ca1992eb724c4cd5cb2f013a1eb909b6d3e5f395d07df84ff34f2", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:02" } } } }

I'm not sure what other information I am to submit to debug this situation. Is there that can be done to improve performance?

Answer 1:

加快这你也可以使用http://docker-sync.io -它已经专门建立OSX下这种情况。



Answer 2:

安装的家中的VirtualBox(MAC)的文件夹被称为是与数据传送速度极慢。 尝试使用泊坞窗的Mac,而不是,或您的内容拷贝到一个名为卷。 例如:

docker create volume --name myvol
docker run --rm --name data-container -v myvol:/data alpine top
docker cp dir/with/files data-container:/data
docker rm -f data-container

这给你一个体积myvol ,你可以在任何容器安装。 体积数据被保存在VirtualBox主机。



文章来源: Slow network performance in Docker container