{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-container/issues/446","repository_url":"https://api.github.com/repos/ansible/ansible-container","labels_url":"https://api.github.com/repos/ansible/ansible-container/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-container/issues/446/comments","events_url":"https://api.github.com/repos/ansible/ansible-container/issues/446/events","html_url":"https://github.com/ansible/ansible-container/issues/446","id":223078839,"number":446,"title":"mount --bind /src /tmp/xxx requires running in a privileged container","user":{"login":"pyconsult","id":7056488,"avatar_url":"https://avatars0.githubusercontent.com/u/7056488?v=3","gravatar_id":"","url":"https://api.github.com/users/pyconsult","html_url":"https://github.com/pyconsult","followers_url":"https://api.github.com/users/pyconsult/followers","following_url":"https://api.github.com/users/pyconsult/following{/other_user}","gists_url":"https://api.github.com/users/pyconsult/gists{/gist_id}","starred_url":"https://api.github.com/users/pyconsult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyconsult/subscriptions","organizations_url":"https://api.github.com/users/pyconsult/orgs","repos_url":"https://api.github.com/users/pyconsult/repos","events_url":"https://api.github.com/users/pyconsult/events{/privacy}","received_events_url":"https://api.github.com/users/pyconsult/received_events","type":"User","site_admin":false},"labels":[{"id":371644772,"url":"https://api.github.com/repos/ansible/ansible-container/labels/bug","name":"bug","color":"ee0701","default":true},{"id":407348409,"url":"https://api.github.com/repos/ansible/ansible-container/labels/needinfo","name":"needinfo","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"chouseknecht","id":1282865,"avatar_url":"https://avatars2.githubusercontent.com/u/1282865?v=3","gravatar_id":"","url":"https://api.github.com/users/chouseknecht","html_url":"https://github.com/chouseknecht","followers_url":"https://api.github.com/users/chouseknecht/followers","following_url":"https://api.github.com/users/chouseknecht/following{/other_user}","gists_url":"https://api.github.com/users/chouseknecht/gists{/gist_id}","starred_url":"https://api.github.com/users/chouseknecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chouseknecht/subscriptions","organizations_url":"https://api.github.com/users/chouseknecht/orgs","repos_url":"https://api.github.com/users/chouseknecht/repos","events_url":"https://api.github.com/users/chouseknecht/events{/privacy}","received_events_url":"https://api.github.com/users/chouseknecht/received_events","type":"User","site_admin":false},"assignees":[{"login":"chouseknecht","id":1282865,"avatar_url":"https://avatars2.githubusercontent.com/u/1282865?v=3","gravatar_id":"","url":"https://api.github.com/users/chouseknecht","html_url":"https://github.com/chouseknecht","followers_url":"https://api.github.com/users/chouseknecht/followers","following_url":"https://api.github.com/users/chouseknecht/following{/other_user}","gists_url":"https://api.github.com/users/chouseknecht/gists{/gist_id}","starred_url":"https://api.github.com/users/chouseknecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chouseknecht/subscriptions","organizations_url":"https://api.github.com/users/chouseknecht/orgs","repos_url":"https://api.github.com/users/chouseknecht/repos","events_url":"https://api.github.com/users/chouseknecht/events{/privacy}","received_events_url":"https://api.github.com/users/chouseknecht/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-04-20T14:05:20Z","updated_at":"2017-04-22T22:51:31Z","closed_at":null,"body":"Hi \r\n\r\nI'm having trouble building my project with ansible-container v0.9. \r\nIt took some work getting a conductor image for ubuntu up and running. I've included the dockerfile for reference:\r\n\r\n```\r\nFROM ubuntu:xenial\r\nRUN apt-get update  && \\\r\n        apt-get install -y \\\r\n                build-essential \\\r\n                python-dev \\\r\n                libssl-dev \\\r\n                libffi-dev \\\r\n                locales \\\r\n                openssl \\\r\n                ca-certificates \\\r\n        && apt-get clean\r\n\r\nRUN locale-gen en_US.UTF-8\r\nENV LANG en_US.UTF-8\r\nENV LANGUAGE en_US:en\r\nENV LC_ALL en_US.UTF-8\r\n```\r\nIt could be nice if I could set the conductor container up using an Ansilble playbook.\r\n\r\nAfter successfully building the conductor container I got the following error when I tried to build my service:\r\n\r\n```\r\nBuilding Docker Engine context...                                                                                                                                                                                                                                       \r\nStarting Docker build of Ansible Container Conductor image (please be patient)...                                                                                                                                                                                       \r\nParsing conductor CLI args.                                                                                                                                                                                                                                             \r\nDocker™ daemon integration engine loaded. Build starting.       project=business_manager                                                                                                                                                                                \r\nBuilding service...     project=business_manager service=base                                                                                                                                                                                                           \r\nmount: mount /src on /tmp/tmp1F_Fws/files failed: Permission denied                                                                                                                                                                                                     \r\nTraceback (most recent call last):                                                                                                                                                                                                                                      \r\n  File \"/usr/local/bin/conductor\", line 11, in <module>                                                                                                                                                                                                                 \r\n    load_entry_point('ansible-container', 'console_scripts', 'conductor')()                                                                                                                                                                                             \r\n  File \"/_ansible/container/__init__.py\", line 19, in __wrapped__                                                                                                                                                                                                       \r\n    return fn(*args, **kwargs)                                                                                                                                                                                                                                          \r\n  File \"/_ansible/container/cli.py\", line 351, in conductor_commandline                                                                                                                                                                                                 \r\n    **params)                                                                                                                                                                                                                                                           \r\n  File \"/_ansible/container/__init__.py\", line 19, in __wrapped__                                                                                                                                                                                                       \r\n    return fn(*args, **kwargs)                                                                                                                                                                                                                                          \r\n  File \"/_ansible/container/core.py\", line 677, in conductorcmd_build                                                                                                                                                                                                   \r\n    debug=debug)                                                                                                                                                                                                                                                        \r\n  File \"/_ansible/container/__init__.py\", line 19, in __wrapped__                                                                                                                                                                                                       \r\n    return fn(*args, **kwargs)                                                                                                                                                                                                                                          \r\n  File \"/_ansible/container/core.py\", line 594, in apply_role_to_container                                                                                                                                                                                              \r\n    python_interpreter, ansible_options, debug)                                                                                                                                                                                                                         \r\n  File \"/_ansible/container/__init__.py\", line 19, in __wrapped__                                                                                                                                                                                                       \r\n    return fn(*args, **kwargs)                                                                                                                                                                                                                                          \r\n  File \"/_ansible/container/core.py\", line 519, in run_playbook                                                                                                                                                                                                         \r\n    raise OSError('Could not bind-mount /src into tmpdir')                                                                                                                                                                                                              \r\nOSError: Could not bind-mount /src into tmpdir                                                                                                                                                                                                                          \r\nConductor terminated. Cleaning up.      command_rc=1 conductor_id=ddaeadeeb57d393c6aa853e77e93e44eae1ef753bc1b343c1555727b8ab93766 save_container=False                                                                                                                 \r\nERROR   Conductor exited with status 1\r\n```\r\n\r\nI can replicate the error by running `mkdir /tmp/test; mount --bind /srv /tmp/test` in a  ubuntu:xenial container. If I start the container with `--privileged` I'm able to do the mount. \r\n\r\nI'm on ubuntu 17.04 and kernel: \r\n`Linux krl-XPS-13-9350 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux`\r\n\r\ncheers\r\nRune\r\n\r\n\r\n\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-container/issues/comments/296406661","html_url":"https://github.com/ansible/ansible-container/issues/446#issuecomment-296406661","issue_url":"https://api.github.com/repos/ansible/ansible-container/issues/446","id":296406661,"user":{"login":"j00bar","id":166664,"avatar_url":"https://avatars0.githubusercontent.com/u/166664?v=3","gravatar_id":"","url":"https://api.github.com/users/j00bar","html_url":"https://github.com/j00bar","followers_url":"https://api.github.com/users/j00bar/followers","following_url":"https://api.github.com/users/j00bar/following{/other_user}","gists_url":"https://api.github.com/users/j00bar/gists{/gist_id}","starred_url":"https://api.github.com/users/j00bar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j00bar/subscriptions","organizations_url":"https://api.github.com/users/j00bar/orgs","repos_url":"https://api.github.com/users/j00bar/repos","events_url":"https://api.github.com/users/j00bar/events{/privacy}","received_events_url":"https://api.github.com/users/j00bar/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T22:51:31Z","updated_at":"2017-04-22T22:51:31Z","body":"@chouseknecht As an aside, probably reasonable for `build` operations to run container privileged."}}
{"actor":{"display_login":"j00bar"}}