{"action":"created","issue":{"url":"https://api.github.com/repos/reinderien/mimic/issues/29","labels_url":"https://api.github.com/repos/reinderien/mimic/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/reinderien/mimic/issues/29/comments","events_url":"https://api.github.com/repos/reinderien/mimic/issues/29/events","html_url":"https://github.com/reinderien/mimic/issues/29","id":113370907,"number":29,"title":"Docker image won't build (missing requirements.txt)","user":{"login":"mcoms","id":517837,"avatar_url":"https://avatars.githubusercontent.com/u/517837?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoms","html_url":"https://github.com/mcoms","followers_url":"https://api.github.com/users/mcoms/followers","following_url":"https://api.github.com/users/mcoms/following{/other_user}","gists_url":"https://api.github.com/users/mcoms/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoms/subscriptions","organizations_url":"https://api.github.com/users/mcoms/orgs","repos_url":"https://api.github.com/users/mcoms/repos","events_url":"https://api.github.com/users/mcoms/events{/privacy}","received_events_url":"https://api.github.com/users/mcoms/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/reinderien/mimic/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"reinderien","id":1236420,"avatar_url":"https://avatars.githubusercontent.com/u/1236420?v=3","gravatar_id":"","url":"https://api.github.com/users/reinderien","html_url":"https://github.com/reinderien","followers_url":"https://api.github.com/users/reinderien/followers","following_url":"https://api.github.com/users/reinderien/following{/other_user}","gists_url":"https://api.github.com/users/reinderien/gists{/gist_id}","starred_url":"https://api.github.com/users/reinderien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinderien/subscriptions","organizations_url":"https://api.github.com/users/reinderien/orgs","repos_url":"https://api.github.com/users/reinderien/repos","events_url":"https://api.github.com/users/reinderien/events{/privacy}","received_events_url":"https://api.github.com/users/reinderien/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-26T14:41:11Z","updated_at":"2015-10-26T15:04:29Z","closed_at":null,"body":"Attempting to build the project using its `Dockerfile` fails as the parent image `python:2-onbuild` [requires a `requirements.txt` file](https://hub.docker.com/_/python/#-python-onbuild-) which is not present (removed in #12).\r\n\r\n```\r\n$ git clone https://github.com/reinderien/mimic.git && cd mimic\r\n$ docker build -t mimic .\r\nStep 0 : FROM python:2-onbuild\r\n# Executing 3 build triggers\r\nTrigger 0, COPY requirements.txt /usr/src/app/\r\nStep 0 : COPY requirements.txt /usr/src/app/\r\nrequirements.txt: no such file or directory\r\n```\r\n\r\nOnce fixed, this would be great as an [automated build on the Docker hub](https://docs.docker.com/docker-hub/github/)!"},"comment":{"url":"https://api.github.com/repos/reinderien/mimic/issues/comments/151166884","html_url":"https://github.com/reinderien/mimic/issues/29#issuecomment-151166884","issue_url":"https://api.github.com/repos/reinderien/mimic/issues/29","id":151166884,"user":{"login":"mcoms","id":517837,"avatar_url":"https://avatars.githubusercontent.com/u/517837?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoms","html_url":"https://github.com/mcoms","followers_url":"https://api.github.com/users/mcoms/followers","following_url":"https://api.github.com/users/mcoms/following{/other_user}","gists_url":"https://api.github.com/users/mcoms/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoms/subscriptions","organizations_url":"https://api.github.com/users/mcoms/orgs","repos_url":"https://api.github.com/users/mcoms/repos","events_url":"https://api.github.com/users/mcoms/events{/privacy}","received_events_url":"https://api.github.com/users/mcoms/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T15:04:29Z","updated_at":"2015-10-26T15:04:29Z","body":"Thanks, this allows the build to proceed, but brings up a warning:\r\n\r\n```\r\n$ docker build -t mimic .\r\nStep 0 : FROM python:2-onbuild\r\n# Executing 3 build triggers\r\nTrigger 0, COPY requirements.txt /usr/src/app/\r\nStep 0 : COPY requirements.txt /usr/src/app/\r\nTrigger 1, RUN pip install --no-cache-dir -r requirements.txt\r\nStep 0 : RUN pip install --no-cache-dir -r requirements.txt\r\n ---> Running in 4a6841f58d29\r\nYou must give at least one requirement to install (see \"pip help install\")\r\nTrigger 2, COPY . /usr/src/app\r\nStep 0 : COPY . /usr/src/app\r\n ---> b5b61ac79976\r\nStep 1 : ENTRYPOINT python /usr/src/app/mimic\r\n ---> Running in f2e3d7a15db1\r\n ---> ae44e47c8b52\r\nSuccessfully built ae44e47c8b52\r\n```\r\n\r\nAnd the resulting container is broken:\r\n\r\n```\r\n$ docker run --rm -ti mimic --explain=o\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/runpy.py\", line 162, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/local/lib/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/usr/src/app/mimic/__main__.py\", line 2, in <module>\r\n    from . import main\r\nValueError: Attempted relative import in non-package\r\n```"}}