{"action":"created","comment":{"url":"https://api.github.com/repos/CTTV/webapp/pulls/comments/82585553","pull_request_review_id":3482226,"id":82585553,"diff_hunk":"@@ -20,13 +27,30 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log && \\\n # Create directories\n RUN mkdir -p /var/www/app /usr/share/nginx_auth /usr/share/nginx_crt /opt/share/webapp\n \n-#copy code and install node & bower deps\n+# Trying to exploit docker container layers:\n+# If the package.json file changes then Docker will re-run the npm install sequence...\n+# otherwise our modules are cached so we aren't rebuilding them every time we change our apps source code!\n+COPY package.json /tmp/package.json\n+# there are some dependencies not in npm library yet","path":"Dockerfile","position":41,"original_position":41,"commit_id":"5b357d29b4bb52f87ce74e2f8a2d92baffeca9eb","original_commit_id":"8823bd3ac95b73409e9cde6ebe238d68d68e2cb3","user":{"login":"elipapa","id":112610,"avatar_url":"https://avatars.githubusercontent.com/u/112610?v=3","gravatar_id":"","url":"https://api.github.com/users/elipapa","html_url":"https://github.com/elipapa","followers_url":"https://api.github.com/users/elipapa/followers","following_url":"https://api.github.com/users/elipapa/following{/other_user}","gists_url":"https://api.github.com/users/elipapa/gists{/gist_id}","starred_url":"https://api.github.com/users/elipapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elipapa/subscriptions","organizations_url":"https://api.github.com/users/elipapa/orgs","repos_url":"https://api.github.com/users/elipapa/repos","events_url":"https://api.github.com/users/elipapa/events{/privacy}","received_events_url":"https://api.github.com/users/elipapa/received_events","type":"User","site_admin":false},"body":"that would be great\r\n","created_at":"2016-10-10T11:25:58Z","updated_at":"2016-10-10T11:25:58Z","html_url":"https://github.com/CTTV/webapp/pull/16#discussion_r82585553","pull_request_url":"https://api.github.com/repos/CTTV/webapp/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/comments/82585553"},"html":{"href":"https://github.com/CTTV/webapp/pull/16#discussion_r82585553"},"pull_request":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/CTTV/webapp/pulls/16","id":88644949,"html_url":"https://github.com/CTTV/webapp/pull/16","diff_url":"https://github.com/CTTV/webapp/pull/16.diff","patch_url":"https://github.com/CTTV/webapp/pull/16.patch","issue_url":"https://api.github.com/repos/CTTV/webapp/issues/16","number":16,"state":"open","locked":false,"title":"improved docker build times if you have caching","user":{"login":"elipapa","id":112610,"avatar_url":"https://avatars.githubusercontent.com/u/112610?v=3","gravatar_id":"","url":"https://api.github.com/users/elipapa","html_url":"https://github.com/elipapa","followers_url":"https://api.github.com/users/elipapa/followers","following_url":"https://api.github.com/users/elipapa/following{/other_user}","gists_url":"https://api.github.com/users/elipapa/gists{/gist_id}","starred_url":"https://api.github.com/users/elipapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elipapa/subscriptions","organizations_url":"https://api.github.com/users/elipapa/orgs","repos_url":"https://api.github.com/users/elipapa/repos","events_url":"https://api.github.com/users/elipapa/events{/privacy}","received_events_url":"https://api.github.com/users/elipapa/received_events","type":"User","site_admin":false},"body":"i moved the commands in the dockerfile around so that we can take advantage of the docker cache. \r\nThere is also some additional logging when the container starts. \r\n\r\nI found out that the previous docker container layers can be reused when building again leading to large speedups. \r\nI changed the dockerfile such that if you don't change your `package.json` between builds, it reuses the layers it already built. That is as long as the building happens on the same machine. Shippable for eg. has a caching mechanism to make this happen. Not sure about quay.io yet.\r\n\r\n*important* For the caching to works I had to rename the `post-install` script to `setup` in package.json. \r\nI moved the same commands later in the dockerfile.","created_at":"2016-10-10T11:11:34Z","updated_at":"2016-10-10T11:25:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b4da72f6e5fe880f17778fb5581badfe0d97c5f","assignee":{"login":"apierleoni","id":148221,"avatar_url":"https://avatars.githubusercontent.com/u/148221?v=3","gravatar_id":"","url":"https://api.github.com/users/apierleoni","html_url":"https://github.com/apierleoni","followers_url":"https://api.github.com/users/apierleoni/followers","following_url":"https://api.github.com/users/apierleoni/following{/other_user}","gists_url":"https://api.github.com/users/apierleoni/gists{/gist_id}","starred_url":"https://api.github.com/users/apierleoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apierleoni/subscriptions","organizations_url":"https://api.github.com/users/apierleoni/orgs","repos_url":"https://api.github.com/users/apierleoni/repos","events_url":"https://api.github.com/users/apierleoni/events{/privacy}","received_events_url":"https://api.github.com/users/apierleoni/received_events","type":"User","site_admin":false},"assignees":[{"login":"apierleoni","id":148221,"avatar_url":"https://avatars.githubusercontent.com/u/148221?v=3","gravatar_id":"","url":"https://api.github.com/users/apierleoni","html_url":"https://github.com/apierleoni","followers_url":"https://api.github.com/users/apierleoni/followers","following_url":"https://api.github.com/users/apierleoni/following{/other_user}","gists_url":"https://api.github.com/users/apierleoni/gists{/gist_id}","starred_url":"https://api.github.com/users/apierleoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apierleoni/subscriptions","organizations_url":"https://api.github.com/users/apierleoni/orgs","repos_url":"https://api.github.com/users/apierleoni/repos","events_url":"https://api.github.com/users/apierleoni/events{/privacy}","received_events_url":"https://api.github.com/users/apierleoni/received_events","type":"User","site_admin":false},{"login":"emepyc","id":473962,"avatar_url":"https://avatars.githubusercontent.com/u/473962?v=3","gravatar_id":"","url":"https://api.github.com/users/emepyc","html_url":"https://github.com/emepyc","followers_url":"https://api.github.com/users/emepyc/followers","following_url":"https://api.github.com/users/emepyc/following{/other_user}","gists_url":"https://api.github.com/users/emepyc/gists{/gist_id}","starred_url":"https://api.github.com/users/emepyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emepyc/subscriptions","organizations_url":"https://api.github.com/users/emepyc/orgs","repos_url":"https://api.github.com/users/emepyc/repos","events_url":"https://api.github.com/users/emepyc/events{/privacy}","received_events_url":"https://api.github.com/users/emepyc/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/CTTV/webapp/pulls/16/commits","review_comments_url":"https://api.github.com/repos/CTTV/webapp/pulls/16/comments","review_comment_url":"https://api.github.com/repos/CTTV/webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CTTV/webapp/issues/16/comments","statuses_url":"https://api.github.com/repos/CTTV/webapp/statuses/5b357d29b4bb52f87ce74e2f8a2d92baffeca9eb","head":{"label":"CTTV:dockerdiet","ref":"dockerdiet","sha":"5b357d29b4bb52f87ce74e2f8a2d92baffeca9eb","user":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"repo":{"id":49709532,"name":"webapp","full_name":"CTTV/webapp","owner":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTTV/webapp","description":"CTTV web app ","fork":false,"url":"https://api.github.com/repos/CTTV/webapp","forks_url":"https://api.github.com/repos/CTTV/webapp/forks","keys_url":"https://api.github.com/repos/CTTV/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTTV/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTTV/webapp/teams","hooks_url":"https://api.github.com/repos/CTTV/webapp/hooks","issue_events_url":"https://api.github.com/repos/CTTV/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/CTTV/webapp/events","assignees_url":"https://api.github.com/repos/CTTV/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/CTTV/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/CTTV/webapp/tags","blobs_url":"https://api.github.com/repos/CTTV/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTTV/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTTV/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTTV/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTTV/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/CTTV/webapp/languages","stargazers_url":"https://api.github.com/repos/CTTV/webapp/stargazers","contributors_url":"https://api.github.com/repos/CTTV/webapp/contributors","subscribers_url":"https://api.github.com/repos/CTTV/webapp/subscribers","subscription_url":"https://api.github.com/repos/CTTV/webapp/subscription","commits_url":"https://api.github.com/repos/CTTV/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTTV/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTTV/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTTV/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTTV/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/CTTV/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTTV/webapp/merges","archive_url":"https://api.github.com/repos/CTTV/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTTV/webapp/downloads","issues_url":"https://api.github.com/repos/CTTV/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/CTTV/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/CTTV/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/CTTV/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTTV/webapp/labels{/name}","releases_url":"https://api.github.com/repos/CTTV/webapp/releases{/id}","deployments_url":"https://api.github.com/repos/CTTV/webapp/deployments","created_at":"2016-01-15T09:28:55Z","updated_at":"2016-10-06T18:53:35Z","pushed_at":"2016-10-10T11:17:58Z","git_url":"git://github.com/CTTV/webapp.git","ssh_url":"git@github.com:CTTV/webapp.git","clone_url":"https://github.com/CTTV/webapp.git","svn_url":"https://github.com/CTTV/webapp","homepage":"","size":9904,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"CTTV:master","ref":"master","sha":"1fa287475a0aabf365b2b1b11202170161c56c6b","user":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"repo":{"id":49709532,"name":"webapp","full_name":"CTTV/webapp","owner":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTTV/webapp","description":"CTTV web app ","fork":false,"url":"https://api.github.com/repos/CTTV/webapp","forks_url":"https://api.github.com/repos/CTTV/webapp/forks","keys_url":"https://api.github.com/repos/CTTV/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTTV/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTTV/webapp/teams","hooks_url":"https://api.github.com/repos/CTTV/webapp/hooks","issue_events_url":"https://api.github.com/repos/CTTV/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/CTTV/webapp/events","assignees_url":"https://api.github.com/repos/CTTV/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/CTTV/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/CTTV/webapp/tags","blobs_url":"https://api.github.com/repos/CTTV/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTTV/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTTV/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTTV/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTTV/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/CTTV/webapp/languages","stargazers_url":"https://api.github.com/repos/CTTV/webapp/stargazers","contributors_url":"https://api.github.com/repos/CTTV/webapp/contributors","subscribers_url":"https://api.github.com/repos/CTTV/webapp/subscribers","subscription_url":"https://api.github.com/repos/CTTV/webapp/subscription","commits_url":"https://api.github.com/repos/CTTV/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTTV/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTTV/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTTV/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTTV/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/CTTV/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTTV/webapp/merges","archive_url":"https://api.github.com/repos/CTTV/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTTV/webapp/downloads","issues_url":"https://api.github.com/repos/CTTV/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/CTTV/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/CTTV/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/CTTV/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTTV/webapp/labels{/name}","releases_url":"https://api.github.com/repos/CTTV/webapp/releases{/id}","deployments_url":"https://api.github.com/repos/CTTV/webapp/deployments","created_at":"2016-01-15T09:28:55Z","updated_at":"2016-10-06T18:53:35Z","pushed_at":"2016-10-10T11:17:58Z","git_url":"git://github.com/CTTV/webapp.git","ssh_url":"git@github.com:CTTV/webapp.git","clone_url":"https://github.com/CTTV/webapp.git","svn_url":"https://github.com/CTTV/webapp","homepage":"","size":9904,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/16"},"html":{"href":"https://github.com/CTTV/webapp/pull/16"},"issue":{"href":"https://api.github.com/repos/CTTV/webapp/issues/16"},"comments":{"href":"https://api.github.com/repos/CTTV/webapp/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CTTV/webapp/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/CTTV/webapp/statuses/5b357d29b4bb52f87ce74e2f8a2d92baffeca9eb"}}}}
{"actor":{"display_login":"elipapa"}}