{"push_id":931650045,"size":1,"distinct_size":1,"ref":"refs/heads/faster-docker","head":"e69a833b7f0d687223e01838fe947f89815482a2","before":"0cf7119257163aeb18101c2cc9bc80277253a594","commits":[{"sha":"e69a833b7f0d687223e01838fe947f89815482a2","author":{"email":"75ef9faee755c70589550b513ad881e5a603182c@whiteink.com","name":"Nick Stenning"},"message":"Speed up repeated docker builds\n\nThis commit attempts to improve the lives of people frequently building\nand deploying the h docker image by increasing the proportion of the\nimage that remains cached across multiple builds, at the cost of a\nsomewhat larger image.\n\nChanges include:\n\n- Build dependencies are now installed once and left in the image, as\n  opposed to installed only for the duration of the build and then\n  removed. The impact of this change is analysed below.\n- CHANGES.rst no longer invalidates application dependency build.\n- Source files are not chowned to the hypothesis user, so source code\n  doesn't take up twice the space in the image.\n\nWith this set of changes, at this commit, the total size of the image is\n460 MB, compared to 282 MB for the image for v0.8.9. But when we look at\nthe layer breakdown for each of these images we see a different story:\n\nv0.8.9 image:\n\n    LAYER                                 SIZE        CUMULATIVE\n    base image                            5.249 MB    5.249 MB\n    system dependencies                   73.88 MB    79.13 MB\n    packaging files                       85.55 kB*   79.22 MB\n    build and application dependencies    130.5 MB*   209.7 MB\n    application source code               64.95 MB*   274.7 MB\n    application static asset build        7.571 MB*   282.2 MB\n\nThis pull request:\n\n    LAYER                                 SIZE        CUMULATIVE\n    base image                            5.249 MB    5.249 MB\n    build and system dependencies         308.1 MB    313.4 MB\n    packaging files                       87.95 kB    313.4 MB\n    application dependencies              106.2 MB    419.6 MB\n    application source code               30.73 MB*   450.4 MB\n    application static asset build        6.145 MB*   456.5 MB\n\nThe difference here is that a typical build (one which didn't change the\npython or node dependencies) would rebuild each of the starred layers,\namounting to a ~203 MB diff previously, and a ~37 MB diff now. The\ndifference is smaller but still not insignificant if a build changes the\npython/node dependencies (~203 MB/143 MB).\n\nThe build is now significantly faster as the system build dependencies\nno longer need to be downloaded and installed every time:\n\n                  NO CACHE     WARM CACHE\n    v0.8.9        7m 9s        6m 41s\n    this commit   7m 15s       57s","distinct":true,"url":"https://api.github.com/repos/hypothesis/h/commits/e69a833b7f0d687223e01838fe947f89815482a2"}]}