我的命令:(我也尝试了fig 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-apacheFig.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来构建fig,但仍然收到这个错误,我认为这可能与我得到的一些SSL错误有关,所以我安装了
pip install requests[security]我尝试卸载了request和fig,然后重新安装了它们。
这是所有使用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发布于 2015-05-24 08:42:48
显然,我用pip安装的安全包需要更新版本的Python。我几乎按照这个指南一步一步地升级了Python,一切都很顺利:https://wolfpaulus.com/jounal/mac/installing_python_osx/
发布于 2015-08-01 20:33:08
如fig's web site上所示
图已被Docker Compose取代,现在已被弃用。新的文档在Docker website上。
你应该使用Docker Compose。
https://stackoverflow.com/questions/30413007
复制相似问题