为什么'fig build'返回:AttributeError:'WrappedSocket'对象没有属性'recvfrom'?

我的命令:(我试图build立–no-cache)

fig build db uses an image, skipping Building web... Traceback (most recent call last): File "/usr/local/bin/fig", line 9, in <module> load_entry_point('fig==1.0.1', 'console_scripts', 'fig')() File "/Library/Python/2.7/site-packages/fig/cli/main.py", line 31, in main command.sys_dispatch() File "/Library/Python/2.7/site-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch self.dispatch(sys.argv[1:], None) File "/Library/Python/2.7/site-packages/fig/cli/command.py", line 28, in dispatch super(Command, self).dispatch(*args, **kwargs) File "/Library/Python/2.7/site-packages/fig/cli/docopt_command.py", line 24, in dispatch self.perform_command(*self.parse(argv, global_options)) File "/Library/Python/2.7/site-packages/fig/cli/command.py", line 56, in perform_command handler(project, command_options) File "/Library/Python/2.7/site-packages/fig/cli/main.py", line 119, in build project.build(service_names=options['SERVICE'], no_cache=no_cache) File "/Library/Python/2.7/site-packages/fig/project.py", line 166, in build service.build(no_cache) File "/Library/Python/2.7/site-packages/fig/service.py", line 397, in build all_events = stream_output(build_output, sys.stdout) File "/Library/Python/2.7/site-packages/fig/progress_stream.py", line 17, in stream_output for chunk in output: File "/Library/Python/2.7/site-packages/docker/client.py", line 279, in _stream_helper socket_fp = socket_obj(_sock=self._get_raw_response_socket(response)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 190, in __init__ setattr(self, method, getattr(_sock, method)) AttributeError: 'WrappedSocket' object has no attribute 'recvfrom' 

Dockerfile:

 FROM php:5.6-apache 

Fig.yml

 web: build: . links: - db ports: - "80:80" volumes: - Symfony/:/var/www/html/ environment: SYMFONY_ENV: dev db: image: mysql:latest ports: - "3306:3306" 

我已经尝试用空fig.yml无花果build设,我仍然得到错误,我认为这可能有一些SSL错误我得到所以我安装了

 pip install requests[security] 

我试着卸载请求,然后重新安装它们。

这是所有使用boot2docker的MacOSX Yosemite(它正在运行)。

 boot2docker -v Boot2Docker-cli version: v1.6.2 Git commit: cb2c3bc docker version Client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 7c8fca2 OS/Arch (client): darwin/amd64 Server version: 1.6.2 Server API version: 1.18 Go version (server): go1.4.2 Git commit (server): 7c8fca2 OS/Arch (server): linux/amd64 fig --version fig 1.0.1 

显然我用pip安装的安全包需要更新的Python版本。 我几乎按照这个指导一步一步升级Python,一切都像一个魅力: https : //wolfpaulus.com/jounal/mac/installing_python_osx/

如图所示:

图已经被Docker Compose所取代,现在已经被弃用了。 新的文档在Docker网站上 。

你应该使用Docker Compose。