Я пытаюсь построить Hello-World-Example из https://docs.ansible.com/ansible-container/getting_started.html. Но когда я запускаю команду "sudo ansible -container build", я получаю следующую ошибку:
ubuntu@ubuntu-VirtualBox:~/Desktop/flaskTest$ sudo ansible-container build
[sudo] password for ubuntu:
Building Docker Engine context...
Starting Docker build of Ansible Container Conductor image (please be patient)...
Parsing conductor CLI args.
Docker™ daemon integration engine loaded. Build starting. project=hello-world
Building service... project=hello-world service=flask
PLAY [flask] *******************************************************************
TASK [Gathering Facts] *********************************************************
ok: [flask]
TASK [flask : Install dumb init] ***********************************************
changed: [flask]
TASK [flask : Install epel] ****************************************************
changed: [flask]
TASK [flask : Install pip] *****************************************************
changed: [flask]
TASK [flask : Create flask user] ***********************************************
changed: [flask]
TASK [flask : Copy source into container] **************************************
changed: [flask]
TASK [flask : Install Python dependencies] *************************************
changed: [flask]
PLAY RECAP *********************************************************************
flask : ok=7 changed=6 unreachable=0 failed=0
Applied role to service role=flask service=flask
Traceback (most recent call last):
File "/usr/bin/conductor", line 11, in <module>
load_entry_point('ansible-container', 'console_scripts', 'conductor')()
File "/_ansible/container/__init__.py", line 19, in __wrapped__
return fn(*args, **kwargs)
File "/_ansible/container/cli.py", line 399, in conductor_commandline
**params)
File "/_ansible/container/__init__.py", line 19, in __wrapped__
return fn(*args, **kwargs)
File "/_ansible/container/core.py", line 827, in conductorcmd_build
with_name=is_last_role)
File "/_ansible/container/docker/engine.py", line 105, in __wrapped__
return fn(self, *args, **kwargs)
File "/_ansible/container/__init__.py", line 19, in __wrapped__
return fn(*args, **kwargs)
File "/_ansible/container/docker/engine.py", line 682, in commit_role_as_layer
return to_commit.commit(**commit_data).id
File "/usr/lib/python2.7/site-packages/docker/models/containers.py", line 111, in commit
**kwargs)
File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/docker/api/container.py", line 131, in commit
json=True)
File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 226, in _result
self._raise_for_status(response)
File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 222, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 400 Client Error: Bad Request ("file with no instructions.")
Conductor terminated. Cleaning up. command_rc=1 conductor_id=18f04765ed90f0ed5437728553e427cae5167d71b024b7e182b72d9db6a6fb8f save_container=False
ERROR Conductor exited with status 1
Чтобы убедиться, что я правильно собрал свой ansible -контейнер, я также попытался построить рабочий и законченный пример из https://github.com/rhuss/ansible-container-demo. Но снова я получаю то же сообщение об ошибке, когда пытаюсь собрать ansible -контейнер:
docker.errors.APIError: 400 Client Error: Bad Request ("file with no instructions.")
Кто-то понимает сообщение об ошибке и может помочь мне решить его? Спасибо!