{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-container/issues/903","repository_url":"https://api.github.com/repos/ansible/ansible-container","labels_url":"https://api.github.com/repos/ansible/ansible-container/issues/903/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-container/issues/903/comments","events_url":"https://api.github.com/repos/ansible/ansible-container/issues/903/events","html_url":"https://github.com/ansible/ansible-container/issues/903","id":304777906,"node_id":"MDU6SXNzdWUzMDQ3Nzc5MDY=","number":903,"title":"ansible-container unable to use docker local registry image to build under \"settings:  conductor: base: ubuntulocal:16.04\"","user":{"login":"infojg9","id":16922225,"node_id":"MDQ6VXNlcjE2OTIyMjI1","avatar_url":"https://avatars3.githubusercontent.com/u/16922225?v=4","gravatar_id":"","url":"https://api.github.com/users/infojg9","html_url":"https://github.com/infojg9","followers_url":"https://api.github.com/users/infojg9/followers","following_url":"https://api.github.com/users/infojg9/following{/other_user}","gists_url":"https://api.github.com/users/infojg9/gists{/gist_id}","starred_url":"https://api.github.com/users/infojg9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infojg9/subscriptions","organizations_url":"https://api.github.com/users/infojg9/orgs","repos_url":"https://api.github.com/users/infojg9/repos","events_url":"https://api.github.com/users/infojg9/events{/privacy}","received_events_url":"https://api.github.com/users/infojg9/received_events","type":"User","site_admin":false},"labels":[{"id":371644777,"node_id":"MDU6TGFiZWwzNzE2NDQ3Nzc=","url":"https://api.github.com/repos/ansible/ansible-container/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-03-13T14:04:02Z","updated_at":"2018-09-23T09:42:53Z","closed_at":"2018-06-19T14:10:12Z","author_association":"NONE","body":"Dear ansible-container team,\r\n\r\nDespite successfully imported docker image into docker local registry and succeeded to perform local pull from local registry, unable to use \"conductor: base: ubuntulocal:16.04\" docker local registry image inside container/container.yml of Ansible Container, version 0.9.2. Tried with and without sudo access without any positive result, error remains same in both the cases. When we reverted back 'base:' and 'from:' to ubuntu:16.04, everything works as expected.\r\n\r\nAny tips/comments would be highly appreciated, looking forward for your kind expert's advice.\r\n\r\nThanks in advance !\r\nKind Regards,\r\ninfojg9\r\n\r\n====\r\n\r\nSUMMARY\r\n\r\nExpectation is to build the ansible-container capability to consume docker local registry image for ubuntu:16.04 official image and while we are trying to build it , its failing with the error(with and without root) as inline:\r\n\r\n====\r\n\r\nSTEPS TO REPRODUCE\r\n\r\n1. Ensure docker local registry is running correctly, for example, we have hosted the local registry under \"localhost:5000/ubuntu\" image:\r\n\r\n$ docker images\r\nREPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE\r\nubuntu                                      16.04               f975c5035748        6 days ago          112MB\r\nubuntulocal                                 16.04               f975c5035748        6 days ago          112MB\r\nlocalhost:5000/ubuntu                       16.04               f975c5035748        6 days ago          112MB\r\n\r\n2. Verify docker local registry pull is working:\r\n\r\n$ docker pull localhost:5000/ubuntu:16.04\r\n16.04: Pulling from ubuntu\r\nDigest: sha256:52286464db54577a128fa1b1aa3c115bd86721b490ff4cbd0cd14d190b66c570\r\nStatus: Image is up to date for localhost:5000/ubuntu:16.04\r\n\r\n3. Run the inline container/container.yml\r\n\r\n $ ansible-container --debug build\r\n\r\nSolution under investigation:\r\n\r\n<...snip...>\r\n\r\ncontainer/container.yml:\r\nversion: \"2\"\r\n\r\nsettings:\r\n  conductor:\r\n    base: localhost:5000/ubuntu  # not working\r\n    #base: ubuntulocal:16.04  # not working\r\n    #base: ubuntu:16.04 # official internet repo, works as expected\r\n\r\n  project_name: proj_name\r\n\r\nservices:\r\n  proj_name:\r\n    from: localhost:5000/ubuntu # not working\r\n    #from: ubuntulocal:16.04 # not working\r\n    #from: ubuntu:16.04  # official internet repo, works as expected\r\n\r\n    roles:\r\n      - role: role_test\r\n\r\n    command: [\"/bin/bash\"]\r\n\r\n<...snip...>\r\n\r\n====\r\n\r\n====\r\n\r\nEXPECTED RESULTS\r\n\r\nAnsible container image should be build using local docker registry (either localhost:5000/ubuntu:16.04 or ubuntulocal:16.04) successfully. However only docker official repository is successfully processed by ansible-container (ubuntu:16.04) and docker local registry image is not accepted by teh current ansible-container.\r\n\r\n====\r\n\r\nACTUAL RESULTS\r\n\r\nError:\r\n```\r\n\r\n    \"stderr_lines\": [\r\n        \"Building Docker Engine context...\\t\", \r\n        \"Starting Docker build of Ansible Container Conductor image (please be patient)...\\t\", \r\n        \"ERROR\\tUnknown exception\\t\", \r\n        \"Traceback (most recent call last):\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/cli.py\\\", line 299, in __call__\", \r\n        \"    getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/__init__.py\\\", line 28, in __wrapped__\", \r\n        \"    return fn(*args, **kwargs)\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/core.py\\\", line 181, in hostcmd_build\", \r\n        \"    environment=env_vars\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/docker/engine.py\\\", line 105, in __wrapped__\", \r\n        \"    return fn(self, *args, **kwargs)\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/__init__.py\\\", line 28, in __wrapped__\", \r\n        \"    return fn(*args, **kwargs)\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/container/docker/engine.py\\\", line 1069, in build_conductor_image\", \r\n        \"    nocache=not cache)\", \r\n        \"  File \\\"/usr/local/lib/python2.7/dist-packages/docker/models/images.py\\\", line 179, in build\", \r\n        \"    raise BuildError(chunk['error'])\", \r\n        \"BuildError: pull access denied for container-conductor-ubuntulocal-16.04, repository does not exist or may require 'docker login'\"\r\n    ], \r\n    \"stdout\": \"\", \r\n    \"stdout_lines\": []\r\n\r\n====\r\n\r\nConfiguration data:\r\n\r\nOS: Ubutnu 16.04.3 LTS amd64 official\r\nAnsible: ansible-playbook 2.4.3.0\r\nAnsible Container, version 0.9.2\r\nPython 2.7.12\r\n\r\n$ docker images\r\nREPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE\r\nubuntu                                      16.04               f975c5035748        6 days ago          112MB\r\nubuntulocal                                 16.04               f975c5035748        6 days ago          112MB\r\nlocalhost:5000/ubuntu                       16.04               f975c5035748        6 days ago          112MB\r\nregistry                                    2                   d1fd7d86a825        2 months ago        33.3MB\r\nansible/container-conductor-ubuntu-xenial   0.9.2               35cf9762959e        5 months ago        640MB\r\n\r\n$ docker pull localhost:5000/ubuntu:16.04\r\n16.04: Pulling from ubuntu\r\nDigest: sha256:52286464db54577a128fa1b1aa3c115bd86721b490ff4cbd0cd14d190b66c570\r\nStatus: Image is up to date for localhost:5000/ubuntu:16.04\r\n\r\n$ docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                      NAMES\r\neee7d299b88f        registry:2          \"/entrypoint.sh /etc…\"   24 minutes ago      Up 24 minutes       127.0.0.1:5000->5000/tcp   local_registry\r\n\r\n$ ansible-container --debug version\r\nAnsible Container, version 0.9.2\r\nLinux, user-u16amd64, 4.13.0-32-generic, #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018, x86_64\r\n2.7.12 (default, Dec  4 2017, 14:50:18) \r\n[GCC 5.4.0 20160609] /usr/bin/python\r\n\r\n$ ansible-playbook --version\r\nansible-playbook 2.4.3.0\r\n  config file = /home/user/.ansible.cfg\r\n  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/local/bin/ansible-playbook\r\n  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]\r\n\r\n$ python --version\r\nPython 2.7.12\r\n\r\n```\r\n====\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-container/issues/comments/423804068","html_url":"https://github.com/ansible/ansible-container/issues/903#issuecomment-423804068","issue_url":"https://api.github.com/repos/ansible/ansible-container/issues/903","id":423804068,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzgwNDA2OA==","user":{"login":"Voronenko","id":701233,"node_id":"MDQ6VXNlcjcwMTIzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/701233?v=4","gravatar_id":"","url":"https://api.github.com/users/Voronenko","html_url":"https://github.com/Voronenko","followers_url":"https://api.github.com/users/Voronenko/followers","following_url":"https://api.github.com/users/Voronenko/following{/other_user}","gists_url":"https://api.github.com/users/Voronenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Voronenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voronenko/subscriptions","organizations_url":"https://api.github.com/users/Voronenko/orgs","repos_url":"https://api.github.com/users/Voronenko/repos","events_url":"https://api.github.com/users/Voronenko/events{/privacy}","received_events_url":"https://api.github.com/users/Voronenko/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T09:42:53Z","updated_at":"2018-09-23T09:42:53Z","author_association":"COLLABORATOR","body":"PR moved versioning slightly forward, yep.   But glad if it has unblocked you"}}
{"actor":{"display_login":"Voronenko"}}