{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker.github.io/issues/674","repository_url":"https://api.github.com/repos/docker/docker.github.io","labels_url":"https://api.github.com/repos/docker/docker.github.io/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker.github.io/issues/674/comments","events_url":"https://api.github.com/repos/docker/docker.github.io/issues/674/events","html_url":"https://github.com/docker/docker.github.io/pull/674","id":190844853,"number":674,"title":"Optimize Dockerfile","user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"johndmulhausen","id":5439615,"avatar_url":"https://avatars.githubusercontent.com/u/5439615?v=3","gravatar_id":"","url":"https://api.github.com/users/johndmulhausen","html_url":"https://github.com/johndmulhausen","followers_url":"https://api.github.com/users/johndmulhausen/followers","following_url":"https://api.github.com/users/johndmulhausen/following{/other_user}","gists_url":"https://api.github.com/users/johndmulhausen/gists{/gist_id}","starred_url":"https://api.github.com/users/johndmulhausen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johndmulhausen/subscriptions","organizations_url":"https://api.github.com/users/johndmulhausen/orgs","repos_url":"https://api.github.com/users/johndmulhausen/repos","events_url":"https://api.github.com/users/johndmulhausen/events{/privacy}","received_events_url":"https://api.github.com/users/johndmulhausen/received_events","type":"User","site_admin":false},"assignees":[{"login":"johndmulhausen","id":5439615,"avatar_url":"https://avatars.githubusercontent.com/u/5439615?v=3","gravatar_id":"","url":"https://api.github.com/users/johndmulhausen","html_url":"https://github.com/johndmulhausen","followers_url":"https://api.github.com/users/johndmulhausen/followers","following_url":"https://api.github.com/users/johndmulhausen/following{/other_user}","gists_url":"https://api.github.com/users/johndmulhausen/gists{/gist_id}","starred_url":"https://api.github.com/users/johndmulhausen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johndmulhausen/subscriptions","organizations_url":"https://api.github.com/users/johndmulhausen/orgs","repos_url":"https://api.github.com/users/johndmulhausen/repos","events_url":"https://api.github.com/users/johndmulhausen/events{/privacy}","received_events_url":"https://api.github.com/users/johndmulhausen/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2016-11-21T21:48:03Z","updated_at":"2016-11-29T13:38:19Z","closed_at":"2016-11-29T00:35:26Z","pull_request":{"url":"https://api.github.com/repos/docker/docker.github.io/pulls/674","html_url":"https://github.com/docker/docker.github.io/pull/674","diff_url":"https://github.com/docker/docker.github.io/pull/674.diff","patch_url":"https://github.com/docker/docker.github.io/pull/674.patch"},"body":"This optimizes the Dockerfile a bit by;\r\n\r\n- putting the docs archives at the top to optimize caching and to\r\n  prevent having to clone the github repository on each build. Note\r\n  that '--no-cache' is needed to forcefully break the cache, but the\r\n  archives should not frequently change\r\n- grouping RUN lines to reduce image size (adds/deletes in the same layer).\r\n- using a loop for the archived versions to reduce the amount of\r\n  duplicated code.\r\n- using the local files for the *current* version of the docs instead\r\n  of the git clone from GitHub. this makes it also use the right source\r\n  instead of \"master\"\r\n- adding a .dockerignore to prevent busting the cache if not needed,\r\n  and to prevent uploading the '.git' repository, which is not used for\r\n  the \"current\" docs\r\n\r\nDifference in size before/after;\r\n\r\n    REPOSITORY     TAG     IMAGE ID      CREATED         SIZE\r\n    docs           latest  36f6ad029e6a  3 minutes ago   1.722 GB\r\n    docs-orig      latest  4f1a3e3fda4f  16 minutes ago  3.344 GB\r\n\r\n/cc @johndmulhausen PTAL, I built this and I think everything works as before, but let me know if there's issues in this change"},"comment":{"url":"https://api.github.com/repos/docker/docker.github.io/issues/comments/263571879","html_url":"https://github.com/docker/docker.github.io/pull/674#issuecomment-263571879","issue_url":"https://api.github.com/repos/docker/docker.github.io/issues/674","id":263571879,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T13:38:19Z","updated_at":"2016-11-29T13:38:19Z","body":"I was thinking the same yesterday; once the docs are built, it's just static files, so any server can be used (even a simple static server, such as https://github.com/mholt/caddy)"}}
{"actor":{"display_login":"thaJeztah"}}